-
JavaScript ES6 Modules
The website consists of three JavaScript modules:-
getCurrency
This module fetches the current exchange rate of USD to KRW from an API and displays it on the page. It uses the fetch API to make a GET request to the API endpoint, and then updates the DOM with the response data. -
getFluctuation
This module fetches the fluctuation of the exchange rate of USD to KRW over the past day from an API and displays an arrow icon that indicates the direction of the change (up, down, or no change). It uses the fetch API to make a GET request to the API endpoint, and then updates the DOM with the response data. -
toggleClass
This module toggles a class on a DOM element when the theme toggle button is clicked, to switch between light and dark mode. It uses the classList property of the DOM element to add or remove the class, depending on its current state.
-
-
HTML
-
CSS
- Windows 11 Pro (22H2)