How can I wait for a JavaScript Promise to resolve before continuing function execution?

Hey @MiroslavRalevic! Now adding a final cautionary note and reinforcing the core principle of JavaScript’s asynchronous nature.

While some might suggest a hacky way to block using a loop, that approach will unfortunately freeze the browser and create a really bad user experience. So, it’s something to actively avoid.

JavaScript is inherently asynchronous when dealing with Promises, so your absolute best bet is to fully embrace async patterns (async/await or .then()).

Thank you!! Hope this helps