Forum Moderators: mack

Message Too Old, No Replies

variable enclosed by plus signs?

what's it mean?

         

mightymid

7:45 pm on Aug 18, 2004 (gmt 0)

10+ Year Member



Hi all. I'm working with an html file that someone else authored. It contains tags to embed a Flash movie, along with some Javascript.

In the script, a variable is declared and then later called in the following string:

+'<param name=movie value="run.swf?exon='+exon+'">'

What's with the plus signs surrounding the variable name?

Thanks!
Mid <--noobie

photon

8:43 pm on Aug 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In JavaScript the plus signs are used for concatenation. So in your example,
+exon+
means "insert the value of the variable exon here". In other words, if the variable exon is "sessionID42" then the expression becomes
value="run.swf?exon=sessionID42"
.