Understand where an objects prototype comes from (#34643)

* Understand where an objects prototype comes from

- One hint and Solution added to index.md

* Add original seed code
This commit is contained in:
Matheus Genteluci
2019-03-17 21:19:21 -03:00
committed by Randell Dawson
parent 9051ad2eb5
commit 6f28548668

View File

@ -3,8 +3,20 @@ title: Understand Where an Objects Prototype Comes From
---
## Understand Where an Objects Prototype Comes From
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
### Hint 1
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
* You should use isPrototypeOf() to complete this challenge.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
### Solution
``` javascript
function Dog(name) {
this.name = name;
}
let beagle = new Dog("Snoopy");
// Add your code below this line
Dog.prototype.isPrototypeOf(beagle);
```