Array.prototype [native code]
[].push() – add an item at a very end of the array :
let add_at_the_end = [1, 2, 3, 4, 5];
add_at_the_end[add_at_the_end.length] = 6;
console.log(add_at_the_end); // [1, 2, 3, 4, 5, 6]
[].unshift() – add an item at the beginning of the array :
let a...
vanillacamp.hashnode.dev2 min read