Need to brush up on the homework setup process? Check this out before you get into some git confusion!
Promises creates a pleasant way of working with asynchronous code. It will make your asynchronous code nearly look synchronous. It is possible to compose promises further developing the function part of javascript.
Since promises is becoming standard in javascript, new browser api's use promises for interacting with them. getUserMedia for accessing webcam, Navigator.getBattery() for getting battery level, Bluetooth.requestDevice(), serviceWorker or USB.requestDevice()
If you struggle to do this weeks homework there are a couple of things to do:
- Try watch these two videos: https://www.youtube.com/watch?v=XO77Fib9tSI, https://www.youtube.com/watch?v=QO4NXhWo_NM
- Watch the class recording. If it for some reason is missing. Then watch these: part 1, part 2, part 3 part 4 part 5
- Read up on promises, async await
The homework for this week is to build a currency calculator using this API: https://open.er-api.com/v6/latest/USD
- Make a request to the API and store the Exchange rates as well as a list of currencies for the dropdowns.
- User can enter an amount
- User can choose a currency to convert from(default should be EUR)
- User can choose a currency to convert to(Default should be DKK)
- Whenever amount, currency from or currency to changes we show what the amount translates to in the to currency