mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-02 11:14:48 +03:00
commit
44e9e4f44b
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user