for(let i=0;i<selectedGroup.children.length;i++){ let group = selectedGroup.children[i]; delete shapeList[group.myShapeIndex];//删除指定下标元素,不改变shapeList长度 } shapeList = shapeList.filter(Boolean);//清除数组中的空元素
标签:删除,元素,指定,标的,循环,数组 From: https://www.cnblogs.com/shark1100913/p/17151081.html