extend an array – js way [ 760 views ]
Goal: find the cleanest way to extend an array
Everyday happening to extend an array in javascript. There are many ways to do but here is the simplest one 🙂
var myArray = [1,2,3]; // extend this is easy myArray = [...myArray, 4, 5, 6];
No more code, no more pain in the neck just an extended array. What we need more for today?