marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.02k stars 796 forks source link

null.length error is different than the book #542

Closed gumbol closed 3 years ago

gumbol commented 3 years ago

hi not an issue. but in VS code i get TypeError: Cannot read property 'length' of null. in the book (p. 60) it say TypeError: null has no properties.

The VS code description doesnt tell you if the property exist. but from the description it assumes there is one. i used code runner ext.

marijnh commented 3 years ago

Right, the precise phrasing of errors depends on the JavaScript engine you're using. The error in the book is the one Firefox emits. I expect VS Code extension uses V8, the engine from Chrome, which has a different message.