illustration for Establish Callback and Closure patterns Around Async Browser Behaviors
pro

Establish Callback and Closure patterns Around Async Browser Behaviors

Instructor

John Lindquist

33m closed-captioning
·
10 lessons
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.8
258
people completed
Published 4 years ago
|
Updated 4 years ago

JavaScript is full of inconsistent APIs. Wrapping those APIs in functions allows you to have full control over how to configure them and make them more reusable.

This becomes even more beneficial when dealing with the async nature of JavaScript. You'll learn how a broadcaster is a function that wraps another function (which we call listeners) and modifies the behavior. We will build up this pattern in a way that allows you to compose broadcasters together making your code more reusable.

You're in Section 02 of Composing Closures and Callbacks in JavaScript