Delete Item in Array

Result

Also use Data.Splice(2,0,99)

To Visualize: Copy code and test Click Here

Code


    let data = [11,22,33,44,55,66,77,88,99]
    let position = 3;

    for(let i=position; i<data.length-1; i++){
      data[i]=data[i+1]
      console.log(data[i])
    }
    data.length=data.length-1
    console.log(data)