Merge pull request #657 from simmayor/prototype-inheritance2
Prototype-inheritance - semicolons
This commit is contained in:
commit
8aa7281d79
1 changed files with 2 additions and 2 deletions
|
@ -112,7 +112,7 @@ let rabbit = {
|
||||||
let longEar = {
|
let longEar = {
|
||||||
earLength: 10,
|
earLength: 10,
|
||||||
__proto__: rabbit
|
__proto__: rabbit
|
||||||
}
|
};
|
||||||
|
|
||||||
// walk is taken from the prototype chain
|
// walk is taken from the prototype chain
|
||||||
longEar.walk(); // Animal walk
|
longEar.walk(); // Animal walk
|
||||||
|
@ -146,7 +146,7 @@ let animal = {
|
||||||
|
|
||||||
let rabbit = {
|
let rabbit = {
|
||||||
__proto__: animal
|
__proto__: animal
|
||||||
}
|
};
|
||||||
|
|
||||||
*!*
|
*!*
|
||||||
rabbit.walk = function() {
|
rabbit.walk = function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue