Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavaScriptthis in callbacks vs methodsSingle-choice MCQ

What is `this` inside the array callback here, in a non-strict (sloppy) script?

const obj = { factor: 3, scale(arr) { return arr.map(function (n) { return n * this.factor; }); } }; console.log(obj.scale([1, 2]));