diff options
author | Frederik Ring <frederik.ring@gmail.com> | 2013-10-03 20:02:16 +0200 |
---|---|---|
committer | Frederik Ring <frederik.ring@gmail.com> | 2013-10-03 20:02:16 +0200 |
commit | a91b4fd300d0fc66b5d5d9c29d86d8b4c4cb5464 (patch) | |
tree | 90efa12c7a3fbebac534d678f9f3d89a618beb93 | |
parent | 42a2263ab1b2d911f6865975e518da91a3b73e0b (diff) |
be consistent with PascalCasing of constructors
-rw-r--r-- | javascript.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown index b15eae7c..6b6be34d 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -357,13 +357,13 @@ myObj.meaningOfLife; // = 43 // Constructors have a property called prototype. This is *not* the prototype of // the constructor function itself; instead, it's the prototype that new objects // are given when they're created with that constructor and the new keyword. -myConstructor.prototype = { +MyConstructor.prototype = { myNumber: 5, getMyNumber: function(){ return this.myNumber; } }; -var myNewObj2 = new myConstructor(); +var myNewObj2 = new MyConstructor(); myNewObj2.getMyNumber(); // = 5 myNewObj2.myNumber = 6 myNewObj2.getMyNumber(); // = 6 |