js中的Array数组清空

var data = new Array();//数组
data.length = 0;//数组的长度等于0,数组的项就会被清空

原文地址:https://www.cnblogs.com/jiuyueBlog/p/10147942.html