Single Choice
Easy
QWhat does the this keyword refer to in the following code?
function greet() {
console.log('Hello, ' + this.name + '!');
}
ID: #4913
Javascript Functions MCQ
267 views
Question Info
#4913Q ID
EasyDifficulty
Javascript Functions MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
In this case, the greet function is a property of an object, and the this keyword refers to that object.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic