Created
May 1, 2013 01:10
-
-
Save allenwlee/5493119 to your computer and use it in GitHub Desktop.
js stuff from lecture
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
var OrangeTree = function() { | |
this.age = 0; | |
this.height = 0; | |
} | |
var orangeTree = new OrangeTree(); | |
OrangeTree.prototype.increaseAge = function() { | |
this | |
}; | |
OrangeTree.prototype = { | |
increaseAge: function() { | |
this.age += 1; | |
if (this.isDead()) { | |
this.height += 1; | |
} | |
}, | |
isDead: function(){ | |
return this.age > 25; | |
} | |
} | |
callbacks | |
blocking versus nonblocking code. | |
$(document).ready(function(){ | |
$.get().done(function(data){console.log('Here 1')}); | |
console.log('Here 2'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment