In an earlier post about JavaScript idioms, I talked about a common idiom for copying an array:
1 2 3 4 |
|
In a comment, Jesse offers the following alternative:
1
|
|
To my eye, this is clearly preferable, and I hope more people use it in the future. Thanks for pointing it out, Jesse.
Also: here’s a good list of JavaScript idioms.
Back to flipping out…