DEV Community

Discussion on: Implementing our own Array.map() method in javascript

Collapse
 
dheerajk30 profile image
Dheeraj Khathuria

I have a question, what if you use an arrow operator. It uses global window as this then, why so?

Collapse
 
dhilipkmr profile image
Dhilip kumar

That's due to the property of the arrow function where it binds the Lexical this as its own this. That is the reason why we not use arrow function here