📅  最后修改于: 2022-03-11 15:02:34             🧑  作者: Mango
// How to select all other values in an array except the ith element in Javascript
// Remove first index element
let orignalArray = [0,1,2,3,4,5];
let cloneArray = orignalArray.slice();
let i = 1;
cloneArray.splice(i,1);
console.log(cloneArray);
// Result: [ 0, 2, 3, 4, 5 ]