fetch data using Async/await and store in array

preview_player
Показать описание
Communicating with APIs in javaScript can be achieved in diverse ways using AJAX, fetch with callbacks, and fetch with async/await. However, Async/await requires less code, and can also prevent nested callbacks traps. But this does not make it any easier, if not well-understood. Data fetch from an API endpoint, and stored in an array is demonstrated here, as it normally gives headaches sometimes, when coding.

Links for sample demo app:
Рекомендации по теме
Комментарии
Автор

This finally helped me put arrays and fetch together, thank you!

ardanetheconqueror
Автор

Thank you Nathaniel! This is really helpful 🙌

nikitapashinsky
join shbcf.ru