In Javascript,
hello += ' world'
// is shorthand for
hello = hello + ' world'
Is there a shorthand operator for the opposite direction?
hello = ' world' + hello
I tried hello =+ ' world'
but it did not work: it just typecast ' world'
into NaN
and then assigned it to hello
.
" world" += hello;
, works but you need to capture the output. – Subcontinent