Being a beginner in JavaScript, I wonder what is the purpose of .prototype.constructor
? What is the purpose of
Function Foo(a) {
this.a = a,
this.b = b
}
What exactly is a constructor function? Thank you.
Being a beginner in JavaScript, I wonder what is the purpose of .prototype.constructor
? What is the purpose of
Function Foo(a) {
this.a = a,
this.b = b
}
What exactly is a constructor function? Thank you.