home garden / webdev / javascript
https://www.freecodecamp.org/news/javascript-asynchronous-operations-in-the-browser
- (2023-08-06) articles like these are invaluable for someone like me who’s coming to web development from another subfield in tech. Understanding how JS handles async functions made me much more comfortable with it, especially coming from Python, a multithreaded language. When you have Python functions that need to be executed in a certain order, you can call them in the order you want. In JS, you gotta tell the JS engine to wait for function x to finish if function y depends on it.
https://www.freecodecamp.org/news/guide-to-javascript-promises/
- (2023-08-06) this write up on Promises is sort of a companion to the previous article on JS async operations. Promises allow you handle the successes and failures of async functions with clean, performant code. I banged my head against a wall trying to understand JS promises for almost a month before I found this post. Hopefully I can save you some time!