Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Another way to concatenate

Tags:

javascript

Is there another a way to concatenate a '#' character like I'm doing below?

radioButtonID = '#' + radioButtonID;

like image 229
PositiveGuy Avatar asked Jan 25 '26 11:01

PositiveGuy


1 Answers

    "#".concat(radioButtonID)
or
    ["#",radioButtonID].join('')
like image 115
Jet Avatar answered Jan 27 '26 23:01

Jet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!