版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/inforstack/article/details/82222025
var ary = ['123','234','345'];
var idx = ary.indexOf('234');
var end = ary.splice(idx, 1);
console.log(end);
console.log(ary);
var ary = ['123','234','345'];
var idx = ary.indexOf('234');
var end = ary.splice(idx, 1);
console.log(end);
console.log(ary);