What will be the output of the following JavaScript code? [code] function code(id,name) { this.id = id; this.name = name;

What will be the output of the following JavaScript code?
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);
A. vivek
B. 101
C. Runtime error
D. Compilation error
 

Tìm kiếm

Back
Top