Nguyễn Trần Mai Trang
New member
What will be the output of the following JavaScript code?
A. vivek
B. 101
C. Runtime error
D. Compilation error
Code:
function code(id,name)
{
this.id = id;
this.name = name;
}
function pcode(id,name)
{
code.call(this,id,name);
}
document.writeln(new pcode(101,"vivek").id);
B. 101
C. Runtime error
D. Compilation error