167 views
How does the constructor behave when no arguments are passed
Task condition
What will be the result of creating an instance if no parameters are specified when calling the constructor, but a parameter is declared in the constructor?
function Test(a) {
this.a = a;
}
const obj = new Test();