3 ms·
Aside from inline object literals, and using strict equality (which you should always be using IMO), what does this specifically have to do this Javascript? Eve
by fourstar 14y ago
Aside from inline object literals, and using strict equality (which you should always be using IMO), what does this specifically have to do this Javascript? Everything else applies to general programming.
- deleted 14y ago[deleted]
- pyrotechnick 14y agoUbiquity: http://github.com/languages http://github.com/languages
- error54 14y agoAgree. Most of the things would apply to (most) all languages such as avoiding verbose comments and not using 1 word variable names. I fully disagree with his stance on not declaring vars at the top of the scope though. It's a good practice with any JIT compiled language as it's easy to declared the same variable twice if you're not paying attention but it's a very hard mistake to catch as it won't throw error. The reason for strict (read:Crockford) conventions is that Javascript is an incredibly loose language thus it is very easy make mistakes.