1.var b = a.slice(beginIndex,endIndex); [].slice.call( [] ) Array.prototype.slice.call([])will copy the array a into b.