loading...

re: Javascript Array.push is 945x faster than Array.concat 🤯🤔 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: While that is true, and although it just so happened that in my use case immutability doesn't matter, but it is still worthwhile to consider using ...
 

it's not very obvious to people that concat creates a new array instead of modifying the first array

I always forget too 😂

FWIW, to me it is very intuitive that concat would create a new array since when I hear the word 'concat' I immediately think of strings. Maybe it's misguided, but that leads me to expect other things to behave the same way strings would.

code of conduct - report abuse