Last active
August 29, 2015 14:26
-
-
Save lacyrhoades/d730a72bd63af35d4260 to your computer and use it in GitHub Desktop.
What comes out for #1 - #9 ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('1'); | |
console.log(this); | |
console.log(); | |
function SomeObject(param) { | |
this.name = param; | |
console.log(this); | |
} | |
SomeObject.prototype.stuff = function () { | |
console.log('2'); | |
console.log('Yeahhhhh...'); | |
} | |
console.log('3') | |
var thing1 = SomeObject('one'); | |
console.log(); | |
console.log('4'); | |
console.log(thing1); | |
console.log(); | |
console.log('5'); | |
var thing2 = new SomeObject('two'); | |
console.log(); | |
console.log('6'); | |
console.log(thing2); | |
console.log(); | |
console.log('7'); | |
console.log(thing2.prototype); | |
console.log(); | |
console.log('8'); | |
console.log(SomeObject.prototype); | |
console.log(); | |
console.log('9'); | |
console.log(this); | |
console.log(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment