var arr = ['1','2'];
delete('1');
function delete(i){
var index = arr.indexOf(i); arr.splice(index, 1) }
var arr = ['1','2'];
delete('1');
function delete(i){
var index = arr.indexOf(i); arr.splice(index, 1) }
转载于:https://www.cnblogs.com/linjiangxian/p/11466097.html