How would you remove all objects from an array?
This question already has an answer here:
只需使用
function clearit() {
array = []; //or array = [""];
}
也许只是重做数组
array = [""]
也可以使用:
array.length = 0;
链接地址: http://www.djcxy.com/p/23950.html
上一篇: 如何从数组中删除所有元素
下一篇: 你将如何从数组中删除所有对象?