js简单错误

var test = ["a","b","c","d"]
test.splice(-1,1)  //["d"]
// test = ["a","b","c"] 

  splice 是从后往前删

posted @ 2019-11-21 11:15  第一神坑  Views(145)  Comments(0)    收藏  举报