js filter get index of item code example Example: js filter items by index let newArray = arr.filter(callback(element[, index, [array]])[, thisArg])