diff options
author | Jakub Jurových <jakub.jurovych@gmail.com> | 2013-07-12 21:14:52 +0200 |
---|---|---|
committer | Jakub Jurových <jakub.jurovych@gmail.com> | 2013-07-12 21:14:52 +0200 |
commit | 94ef913f98e1f14c5c663f09bdcbbe0c869057e3 (patch) | |
tree | e46c1a5439eda2675e2866287c5c73a572b26273 | |
parent | 50444ed21f224c2de7bc7d408621152daa1d06c8 (diff) |
s/self/this in JavaScript
-rw-r--r-- | javascript.html.markdown | 2 |
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() |