What's the equivalent of PHP's " .= " in Javascript, to add something to a variable..?

Posted by pnichols on Stack Overflow See other posts from Stack Overflow or by pnichols
Published on 2010-05-28T21:17:05Z Indexed on 2010/05/28 21:22 UTC
Read the original article Hit count: 121

Filed under:
|
|

In PHP you can do:

$myvar = "Hello";
$myvar .= " world!";
echo $myvar;

The output is: Hello world!

How can I do this in Javascript/jQuery..?

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript