Learn JavaScript the Moore way.
- What does every function return by default (in JavaScript)?
- Are
undefined
andnull
equal to each other? If so, why? - What are the data types in JavaScript?
- Does JavaScript have namespaces or modules?
- How are variables scoped in JavaScript?
- In the browser, what is the default scoping?
- How do you tell the number of arguments passed to a function?
- How do you check if an expected argument is not null?
- What are the two ways to run a function after some timeout period?
- What happens when you call a function that has not been defined?
- What happens when you use a variable that has not been defined?
- Write a function and demonstrate the 'this' pointer changing contexts.
- What is a common idiom for avoiding
this
changing contexts. - Can you pass a function as an argument to another function?
- How do you call a function that has been passed as an argument?
- How do you create a function from a string at runtime?
- How do read the available properties of an object?
- What function does every object have by default?
- What is the difference between == and ===?
- Is 0 considered true or false (in JavaScript)? Where does this idiom come from?
- What is the type of an array object in JavaScript? Does this make sense?
- How do you test if an object is an array in JavaScript?
- Why should one prefer
{ }
and[ ]
when creating objects and arrays overnew Object()
andnew Array()
?
###Performance
- Why do for loops perform faster when you decrement an iterator as opposed to incrementing? (Still true?)