Skip to content

Instantly share code, notes, and snippets.

@daneroo
Created June 18, 2011 17:38
Show Gist options
  • Select an option

  • Save daneroo/1033309 to your computer and use it in GitHub Desktop.

Select an option

Save daneroo/1033309 to your computer and use it in GitHub Desktop.
typeof(v): ["number","object","undefined"]
==null (v): [false,true,true]
===null (v): [false,true,false]
var lookup = {
0: 42,
1: null
}
var v = [lookup[0],lookup[1],lookup[2]];
console.log("v: %j",v);
console.log("typeof(v): %j",[typeof(v[0]),typeof(v[1]),typeof(v[2])]);
console.log("==null (v): %j",[v[0]==null,v[1]==null,v[2]==null]);
console.log("===null (v): %j", [v[0]===null,v[1]===null,v[2]===null]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment