var a = [1,4,2,5,6,9,10];console.log(a.slice(3)); //[5,6,9,10]console.log(a.slice(-3)); //[6,9,10]console.log(a.slice(2,4)); //[2,5]console.log(a.splice(4)); //[6,9,10]console.log(a); //[1,4,2,5] //splice()方法是在数组中插入或删除元素的通用方法//区别于slice的地方是:splice会改变原