summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-07-12 14:04:17 -0700
committerAdam Bard <github@adambard.com>2013-07-12 14:04:17 -0700
commit44e9e4f44b3320ec6d335f35fb2e2e34ba7135cc (patch)
treee46c1a5439eda2675e2866287c5c73a572b26273
parent50444ed21f224c2de7bc7d408621152daa1d06c8 (diff)
parent94ef913f98e1f14c5c663f09bdcbbe0c869057e3 (diff)
Merge pull request #120 from equiet/master
JavaScript: s/self/this
-rw-r--r--javascript.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown
index 254163e8..cbe82054 100644
--- a/javascript.html.markdown
+++ b/javascript.html.markdown
@@ -364,7 +364,7 @@ myObj.meaningOfLife // = 43
// are given when they're created with that constructor and the new keyword.
myConstructor.prototype = {
getMyNumber: function(){
- return self.myNumber
+ return this.myNumber
}
}
var myNewObj2 = new myConstructor()