MCQs>IT & Programming>JavaScript>var x = {}; var foo = function () { this.hello = 'Hi'; return this; }; x.bar = foo; What is the value of the following code: x.bar().bar().hello;
JavaScript MCQs
var x = {}; var foo = function () { this.hello = "Hi"; return this; }; x.bar = foo; What is the value of the following code: x.bar().bar().hello;
Answer
Correct Answer: "Hi"
Explanation:
Note: This Question is unanswered, help us to find answer for this one