I was noticing that in JavaScript the String
object has a method called concat
. It serves to do the same thing as the +
operator does.
"Meu nome é " + nome
Already with concat
would look like this:
"Meu nome é ".concat(nome)
In particular, I believe that using the String.concat
method would be more organized. But I would like to know first if it is guaranteed that this will work in all current browsers.
Is this a recent function? Can I use it without fear?
Note : To be sure, this question is being asked in the year 2016.