Javascript Prototype Every JavaScript object has a prototype. The prototype is also an object.

qsc hookup All JavaScript objects inherit their properties and methods from their prototype. JavaScript Prototypes
All JavaScript objects inherit the properties and methods from their prototype. Objects created using an object literal, or with new Object(), inherit from a prototype called Object.prototype.

get link Objects created with new Date() inherit the Date.prototype. The Object.prototype is on the top of the prototype chain. All JavaScript objects (Date, Array, RegExp, Function, ….) inherit from the Object.prototype.

mujer busca hombre quito norte Creating a Prototype
The standard way to create an object prototype is to use an object constructor function:

click here <!DOCTYPE html> <html> <body> <p id="demo"></p> <script> function Person(first, last, age, eye) { this.firstName = first; this.lastName = last; this.age = age; this.eyeColor = eye; } //adding new property using prototype Person.prototype.test=(function(){ return "ppppp"; })(); var myFather = new Person("John", "Doe", 50, "blue"); var myMother = new Person("Sally", "Rally", 48, "green"); document.getElementById("demo").innerHTML = "My father is " + myFather.age + ". My mother is " + myMother.age+" Newly Added property using prototype "+myFather.test; </script> </body> </html>

tellement vrai rencontre internet Output:
My father is 50. My mother is 48 Newly Added property using prototype ppppp