Search
Since we have placed the setTimeout inside the try {...} block, the given code does not catch the error caused by - console.log(lastName).
setTimeout
try {...}
console.log(lastName)
Move the try...catch inside the definition of the first argument of setTimeout to show the error message.
try...catch