Q. Which one of the following options is the correct output for the given code of JavaScript?
Code:var person =
{
name: "James",
getName:function()
{
nreturnthis.name;
}
}
varunboundName=person.getName;
varboundName=unboundName.bind(person);
document.writeln(boundName());
β
Correct Answer: (A)
James