Promises
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
The nice thing then() does is it also returns a Promise. That lets you chain
successive calls together.
Now there's a correspondence between how the code reads on the page and how it's executed by the interpreter. That makes it a lot more readable and maintainable. Remember that your primary audience when you write software is for other humans to read, more than for a machine to execute.