r/javascript • • Feb 23 '13

Common JavaScript "Gotchas"

https://github.com/stevekwan/best-practices/blob/master/javascript/gotchas.md
16 Upvotes

50 comments sorted by

View all comments

18

u/[deleted] Feb 23 '13

This is possibly the worst blog entry I've ever read on JavaScript. It's downright incorrect in most cases and full of unsubstantiated opinion.

4

u/[deleted] Feb 23 '13

Can you explain why is the worst? He explains some best practices in a clear way.

-1

u/totemcatcher Feb 23 '13

One of the problems I noticed (among many discussed in this thread) is the function declaration no-no. It says never declare globally. But it doesn't discuss namespacing in javascript and how you pretty much have to use that function declaration type when namespacing.