Pham Quỳnh
New member
What will be the output of the following JavaScript code?
A. undefined
B. runtime error
C. compilation error
D. rahul
Code:
function person()
{
this.name = 'rahul';
}
function obj()
{
obj.call(this)
}
obj.prototype = Object.create(person.prototype);
const app = new obj();
console.log(app.name);
B. runtime error
C. compilation error
D. rahul