kaniosrn-j
1/14/2020 - 4:13 PM

Remove an item from array

let removeIndex = 2

let arr = [1,2,3,4,5,6,8]
let a = arr.slice(0,removeIndex) // [1, 2]
let b = arr.slice(removeIndex + 1) // [4, 5, 6, 8]

let results = a.concat(b) // [1, 2, 4, 5, 6, 8]