How To Create This Simple Currency Converter with JavaScript && Learn Async/Await

preview_player
Показать описание
In this project, I'll show you how to code a simple currency converter app with JavaScript and teach you how to use async and await in JavaScript.

00:00 Intro
00:31 Markup
05:03 Styling
12:10 Asynchronous Functions
20:31 Populate select elements
26:21 Convert Currencies
32:01 Error Handling

So here's an excellent project for you to show off your skills in working with APIs but also to demonstrate your knowledge of the async and await keywords in JavaScript and how these can be used in place of Promise chains.

We'll start off by creating the markup in our HTML file which will mainly focus on the form the user users to make a currency selection and then move on to styling the layout using CSS.

Then the main part of the project will focus on fetching the currencies from the API using the async/await syntax and we'll also look at some cool ways to populate the select elements on the page.

Once we've set up our form we'll see how we can create an event listener for the form which will trigger a further call to the API in order to get the base exchange rate which can then be used to convert the amount of currency the user has provided.

So hopefully you'll learn lots about JavaScript and especially the async and await keywords and how they can be used to make asynchronous functions in your code.

#javascript #javascriptproject #javascriptbeginners

Channel Handle @codebubb
Рекомендации по теме
Комментарии
Автор

I set a weekend reminder to go through this tutorial - it's brilliant! Thank you so much codebubb!! 🏆
EDIT: When testing the Catch Error, when I re-connect to the network, what's the best way to return the convertResult class back to normal? It seems to get stuck as .error.

karlstenator
Автор

Can i get its code or repo link? I appreciate, its the best currency convertor project on youtube. Thanks for making such nice content.

sanyamidha
Автор

Great vídeo, are very important your lessons

frankoviedo