KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have read Crockford's JavaScript: The Good Parts and have used his validator JSLint . I am sometimes left wondering the justification behind his recommendations. Below is a list of examples I want substantiated. Why does JSLint signal an error if you don't include "use strict"; ? [See this SO thread .] Why should variable declarations within a function be done using a single var ? [See this SO thread .] Why do we need to put a space between function and () in function () ? Why can't we use continue ? What is wrong with ++ and -- ? Why can't we use the comma operator , (except in the initialisation and incrementation parts of the for statement)? [See this blog post .] Why should every single statement end with ; ? [See this blog post .]
Tags (comma-separated)
Save Edits
Cancel