summaryrefslogtreecommitdiffhomepage
path: root/javascript.html.markdown
diff options
context:
space:
mode:
authorAdam Brenecki <adam@brenecki.id.au>2013-10-04 03:45:00 -0700
committerAdam Brenecki <adam@brenecki.id.au>2013-10-04 03:45:00 -0700
commit24514c9de1f4cbf0e84a88cb665060a376334a1c (patch)
tree90efa12c7a3fbebac534d678f9f3d89a618beb93 /javascript.html.markdown
parent42a2263ab1b2d911f6865975e518da91a3b73e0b (diff)
parenta91b4fd300d0fc66b5d5d9c29d86d8b4c4cb5464 (diff)
Merge pull request #373 from m90/master
[javascript/en] Be consistent with PascalCasing of constructors
Diffstat (limited to 'javascript.html.markdown')
-rw-r--r--javascript.html.markdown4
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