// remove data const data = [2, 3, 4, 52, 13] const position = 2 for (let i = position; i < data.length - 1; i++) { data[i] = data[i + 1] } data.length = data.length - 1 console.log(`===> :: data`, data)