**`splice()`** 方法通过删除或替换现有元素或者原地添加新的元素来修改数组,并以数组形式返回被修改的内容,此方*****改变原数组**。**splice(index,change,value)****index**:开始的下标**change**:代表删除的元素**value**:插入的值,不写直接删除```jsconst months = ['Jan', 'March', 'April', 'June'];months.splice(1, 0, 'Feb');// inserts at index 1console.log(months);// expected output: Array ["Jan", "Feb", "March", "April", "June"]months.splice(4, 1, 'May');// replaces 1 element at index 4console.log(months);// expected output: Array ["Jan", "Feb", "March", "April", "May"]```**适用于数组**