Answers for "typescript block scoped variable used before its declaration"

0

typescript block scoped variable used before its declaration

// true
let foundIndex:any
foundIndex = (additionalPassenger as any).findIndex((item) => item.id === passengerId)
(additionalPassenger as any).splice(foundIndex, 1)

// false
let foundIndex = (additionalPassenger as any).findIndex((item) => item.id === passengerId)
(additionalPassenger as any).splice(foundIndex, 1)
Posted by: Guest on September-05-2021

Code answers related to "typescript block scoped variable used before its declaration"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language