ProAnswers.org

How One can know that he know JavaScript?

Is there a set of things that every JavaScript programmer should know that he know all about JavaScript?

Frameworks may be useful, but they are often hiding the sometimes details of how JavaScript and the DOM actually work from you. I

Here are some JavaScript language features that you should know to grok what it's doing and not get caught out, but which aren't immediately obvious to many people:


	
		That object.prop and object['prop'] are the same thing (so can you please stop usingeval, thanks); that object properties are always strings (even for arrays); [what it isn't](http://bonsaiden.github.com/JavaScript-Garden/#array.general)).

Property-sniffing; what undefined is (and why it smells); why the seemingly-little-known in operator is beneficial and different from typeof/undefined checks; hasOwnProperty; the purpose of delete.

That the Number datatype is really a float; the language-independent difficulties of using floats; avoiding the parseInt octal trap.

Nested function scoping; the necessity of using var in the scope you want to avoid accidental globals; how scopes can be used for closures; the closure loop problem.

How global variables and window properties collide; how global variables and document elements shouldn’t collide but do in IE; the necessity of using var in global scope too to avoid this.

How the function statement acts to ‘hoist’ a definition before code preceding it; the difference between function statements and function expressions; why named function expressions should not be used.