A
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());
{
name: "James",
getName:function()
{
nreturnthis.name;
}
}
varunboundName=person.getName;
varboundName=unboundName.bind(person);
document.writeln(boundName());
- Correct Answer - Option(A)
- Views: 8
- Filed under category JavaScript
- Hashtags:
Discusssion
Login to discuss.