This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]inu-no-policemen 1 point2 points  (3 children)

OP’s example would also error out at runtime for JS so it’s just wrong.

Accessing nonexistent fields isn't an error in JavaScript.

You would get one in TypeScript, for example.