object prototype example
Example 1: function prototype javascript
function Person(name) {
this.name = name;
}
Person.prototype.getName = function() {
return this.name;
}
var person = new Person("John Doe");
person.getName() //"John Doe"
Example 2: access the prototype of an object javascript
Object.getPrototypeOf(x);
//Output
ƒ () { [native code] }