Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to add to a line?

    thetext1[0]="Comprehensive JavaScript tutorials and over 400+ free scripts"
    thetext1[0]="Second part"

    How would I make the second line of that add to the first one?
    I tried
    .thetext1[0]="second part"
    and
    +thetext1[0]="second part"

    but it wont work

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    338
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    thetext1[0]="Comprehensive JavaScript tutorials and over 400+ free scripts"
    thetext1[0]+="Second part"
    JavaScript uses the plus operator ("+") for concatenation of strings.
    http://devedge.netscape.com/library/...s.html#1042582

    Hope that helps!

    Happy coding!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •