const list = [1,2,100,50,100,20]
const index = list.findLastIndex((item)=>item===100)
console.log(index)
// TypeError: list.findLastIndex is not a function
Can we say that this method does not exist, but it does exist in MDN
if you look at compatibility info on MDN
it is not supported below node 18.
check your node version
node -v
Or
node --version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With