when concatenating strings, stringbuffer can be orders of magnitude faster. one c# example from google search "stringbuilder vs string benchmark" from codinggame.com measures 2.5 minutes for string += and 99ms for stringbuilder.
https://jsperf.com/javascript-concat-vs-join/2
Don't assume a certain way of coding is faster because you read it on the Internet, actually profile your code.
I am amazed and saddened, that in 2020, concatenating strings, regardless of the form or language, is not blazing fast across all environments.