Sorry i am so new to jQuery and not sure how to do that.
Basically in php i can do something like this:
$result = '';
$result .= 'Hi';
$result .= ' there';
echo $result;
I am just asking if there’s an exact copy or alternative in jQuery. instead of adding variables with plus sign which works for me, but I want all variables to be added up to the large variable, just i do in php.
Thanks very much.
As others have mentioned, yes, + is used for concatenation, but is the equivalent of
.in PHP. The direct equivalent of.=in JavaScript is+=