Possible Duplicate:
JavaScript Variable inside string without concatenation - like PHP
In PHP, double quotes has the ability to read variable, e.g.
"$foo" But in JavaScript, you have to always use a + to read a variable so that the variable won't be inside the quote when it is read, e.g.
var foo='bar'; alert("The name's "+foo); So, is there any workaround or method to do this? Using + all the time is quite troublesome.
alert(["The name's ", foo].join(''));;)