3 ms·
Re: 2: The history of language in general has included a lot of detours dealing with asynchronous programming. Python, which the OP mentions as familiar, has an
by WorldMaker 8y ago
Re: 2: The history of language in general has included a lot of detours dealing with asynchronous programming. Python, which the OP mentions as familiar, has an almost even more convoluted history of asynchronous programming patterns than JS.
Both languages have settled on the async/await keywords for the most part these days, and the underlying components are relatively similar, though Python's coroutines are a little more complicated/hands-on than JS Promises.
On this subject, I highly recommend finding an environment that lets you use async/await patterns today. It makes working with Promises a lot easier/cleaner, and also makes you aware of why Promises are so great and the remaining other options such as callbacks should be wrapped with Promises then otherwise forgotten. Babel has transpilation options for it, but personally I'm strongly in favor of Typescript.