Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptthis in callbacks vs methodsSingle-choice MCQ1 views

What does this code log?

"use strict";\nconst o = { x: "b", f() { return this.x; } };\nconst g = o.f;\nconsole.log(g());