Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyJavaScriptthis in callbacks vs methodsSingle-choice MCQ4,127 views

What will this code output?

const obj = { name: "Hello", sayHello: function() { console.log(this.name); } }; obj.sayHello();