I have written below code and trying to understand why it is not returning undefined
.
"use strict";
const arrowFunc = () => {
console.log(this);
};
arrowFunc(); // Expected output: undefined
My understanding is that since I am using "use strict";
, this
in the global scope is undefined
.