javascript-koans icon indicating copy to clipboard operation
javascript-koans copied to clipboard

Update AboutMutability.js

Open shaohua opened this issue 10 years ago • 0 comments

In this particular test case, the function on Person.prototype is not mutated. Rather, it is because the object aPerson itself has the method with the same name getFullName, it doesn't need to go to its prototype to find the method anymore.

In summary, both aPerson.getFullName and aPerson.prototype.getFullName exist. The getFullName on the prototype is masked, not mutated.

shaohua avatar Nov 22 '14 22:11 shaohua