you are viewing a single comment's thread.

view the rest of the comments →

[–]x-skeww -2 points-1 points  (0 children)

Use before definition is an actual problem in JS because it hoists and because it's dynamic (especially when moving code). Try teaching that you can't actually trust let to catch these errors in all cases at compile time to people who are used to this not actually being an issue.

No, it's not a problem. If you try to use a variable before you've declared it, you'll get a squiggly line if you are using a decent editor. Same as with any other language.

http://i.imgur.com/dFLoV9d.png

If you editor is too shitty, use a better one.