Interesting, thanks for writing out the test! Good to keep in mind if you need to optimize the code. But I wonder as spread become more popular, if the browser will start optimizing it ... maybe concat is faster because it’s been around longer and the browser is deciphering it 🤔
I wondered that too. You would think it would just call concat internally. I'm not sure what would cause the huge difference.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.