JavaScript Splice and other Array Manipulation Methods
Recently, during one of the local JavaScript weekend workshops, one of the guys raised a question about JavaScript Array.prototype.splice(). He showed the below sample code:
var a = ['apple','boy','cat'];
var b = a.splice(0,2);
console.log(a); // outputs ['cat']
console.log(b); // outputs ['apple'.'boy']
The question was quite simple, he asked Read more