Skip to content

Instantly share code, notes, and snippets.

@iegik
Created February 19, 2012 18:24
Show Gist options
  • Save iegik/1864984 to your computer and use it in GitHub Desktop.
Save iegik/1864984 to your computer and use it in GitHub Desktop.
JavaScript console cheatsheet
var d=document,
w={
'window':0,'d':0,'d.forms':0,
'form':1,'input':1,'table':1,'a':1,
'/./':0,'!1':0,'0xf0':0,'070':0,'0.90':0,'""':0,"''":0,'Array()':0,'Math':0
}
for(k in w){
if(w[k])
k = d.createElement(k);
v=eval(k);
console.log(v.__proto__,v,k);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment