Category Archives: javascript
A good post on using Jasmine, Coffeescript to BDD Backbonejs application
A good post on javascript mixin
two good posts on functional javascript
Javascript & jQuery style guide
ways to check if a variable is undefined in javascript
var x;
1. x === undefined (returns true)
2. typeof x == ‘undefined’ (returns true)
3. !x (returns true)
4. x == void 0 (returns true, not a good idea though because it is hard to understand)
4. if you have a variable x, when its value is undefined but typeof x returns ‘string’ and x === undefined returns false, then try x == ‘undefined’. 🙂