No AttributeError: undefined and the Crash That Comes Later

Your setup check can print a report and still contain a misspelled name. Python usually stops at a missing attribute. JavaScript can carry the missing value through several lines before it crashes. You’ll learn to trace that crash back to its source before sending the report to the onboarding channel.

Read a Missing Property

What Python calls an attribute, JavaScript calls a property. Python’s sys.verison raises AttributeError at the read. During the port, a similar slip leaves process.verison in the JavaScript. Before you run these lines, predict whether either line prints or the property read raises an error:

Language: JavaScript
console.log(process.verison);
console.log("Still running");

Both lines print:

Language: Program Output
undefined
Still running

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.