my code:
var test = "aa";
test += "ee";
alert(test);
Prints out "aaee"
How can I do the same thing, but add the string not to end, but start: Like this:
var test = "aa";
test = "ee" + test;
This is the long way, but is there somekind of shorter way like in 1st example?
What I want is that I must not write the initial variable out again in definition.
There's no built-in operator that allows you to achieve this as in the first example. Also test = "ee" + test;
seems pretty self explanatory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With