Everything You Need to Know About Promises, Thenables, & Lazy-Evaluation
Too Long; Didn't Read
In the new year, I’m going to show you how to make `Promise`s to be more lazy. Let’s look at a basic `Promise’ example. Here, I have a function called sleep that takes a time in milliseconds and a value. It returns a promise that will execute a `setTimeout` for the number of milliseconds that we should wait.