How to rewrite a callback function in Promise form and async/await form in JavaScript

How to rewrite a callback function in Promise form and async/await form in JavaScript
JavaScript - cover
Magazine
Avatar - Thinslices

Thinslices flipped this story into JavaScript816d