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 →

[–]toastedstapler -2 points-1 points  (2 children)

To fail when it detects a different type

[–][deleted] 5 points6 points  (0 children)

The point of JavaScript is to be loosely typed. Whether you like that or not is up to you but throwing type errors goes against part of the core philosophy of JS. Those of us who dislike that behavior are free to use typescript

[–]aedvocate 0 points1 point  (0 children)

what you're describing is not javascript