Home > other >  findLastIndex is not a function,how,why
findLastIndex is not a function,how,why

Time:01-13

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

CodePudding user response:

if you look at compatibility info on MDN

it is not supported below node 18.

check your node version

    node -v

Or

    node --version
  • Related