summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJakub Jurových <jakub.jurovych@gmail.com>2013-07-12 21:14:52 +0200
committerJakub Jurových <jakub.jurovych@gmail.com>2013-07-12 21:14:52 +0200
commit94ef913f98e1f14c5c663f09bdcbbe0c869057e3 (patch)
treee46c1a5439eda2675e2866287c5c73a572b26273
parent50444ed21f224c2de7bc7d408621152daa1d06c8 (diff)
s/self/this in JavaScript
-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()