How To Access “this” Inside a JavaScript Callback Function

Let’s address the confusing keyword once and for all

Johannes Baum
Better Programming
Published in
3 min readFeb 1, 2021

--

Toy figurine
Photo by Edo Nugroho on Unsplash.

The this keyword causes some confusion for many JavaScript programmers, especially those coming from other languages. A frequently asked question is how to access the correct this inside a callback function.

--

--