Skip to content

Instantly share code, notes, and snippets.

@jaseemabid
jaseemabid / simple_this_ex.js
Created August 23, 2011 14:06 — forked from kaaes/simple_this_ex.js
basic example of this object
var a, b, c, d, e;
a = function(obj) {
return this;
}
// when you call the function in 'function form' 'this' is window object
a(); // window
@jaseemabid
jaseemabid / objects.js
Created August 23, 2011 13:37 — forked from kaaes/objects.js
ECMA5 object cheatsheet
/**
* Object descriptor
**/
var a = {
prop1 : 14
}
var descriptorObj1 = Object.getOwnPropertyDescriptor(a, 'prop1');