I was able to read your code without getting lost

How to Keep Your Code Tidy By Avoiding Nested Closures

JavaScript’s pattern for clean callbacks using “bind”

JavaScript in Plain English
6 min readNov 12, 2019

--

JavaScript’s “this” can be problematic for beginners, and closures bring their own set of concerns. The “bind” function, introduced in ES2015, solves these issues and brings clarity to your code. In this episode Antoní shares a forgotten pattern for dealing with ECMAScript’s “this”.

--

--