...

View Full Version : How to add to a line?



Darren06
06-03-2004, 01:03 AM
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 :(

nolachrymose
06-03-2004, 01:27 AM
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/manuals/2000/javascript/1.5/reference/ops.html#1042582

Hope that helps!

Happy coding! :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum