let originalArray = [1, 2, 3, 4, 5]; let filteredArray = originalArray.filter((value, index) => index !== 2);