const arr = ['a', 'b', 'c', 'd', 'e'] const dynamic = 3 //remove from the last of the array dynamically //I know I can pop an element from an array in javascript //removes from the last const pop = arr.pop(3) console.log(arr)