3 ways to concatenate strings with JavaScript

I genuinely thought that I had covered this topic already.  It appears that the closest that I came was “PHP: Fun with strings” (back in 2014), so let’s do it now?

See the Pen
String concatenation in JavaScript
by Joe Steinbring (@steinbring)
on CodePen.

The three methods that I’m using about are concat(), “[string 1] = [string1] + [string 2]”, and “[string 1] += [string 2]”.  Any of the three should work for you.

Leave a Reply

Your email address will not be published. Required fields are marked *