splice用法 var arr=[1,2,3] arr.splice(-3,1) console.log(arr.splice(-3,1)) ==>[1] /* arr.splice(-a,b) -a是下标,-1的下标值是3,-2是2,-3是1 b,从下标的从左到右算起 /