A

Admin • 833K Points
Coach

Q. Which one of the following options is the correct output for the given code of JavaScript?

Code:
function code(id,name)
{
this.id= id;
this.name= name;
}
functionpcode(id,name)
{
code.call(this,id,name);
}
document.writeln(newpcode(004,"James Deo").id);
  • (A) James Deo
  • (B) compilation error
  • (C) runtime error
  • (D) undefined
  • Correct Answer - Option(A)
  • Views: 18
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.