📜  js test1 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:24.580000             🧑  作者: Mango

代码示例1
const array = [2, 5, 9];

console.log(array);

const index = array.indexOf(5);
if (index > -1) {
  array.splice(index, 1);
}

// array = [2, 9]