Answers for "using dot prototype with constructor in javascript"

0

using dot prototype with constructor in javascript

function Foo() {
}
Foo.prototype.answer = 42;

var f = new Foo();
console.log(f.answer); // "42"
Posted by: Guest on August-04-2020

Code answers related to "using dot prototype with constructor in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language