This project is a Currency Converter built using HTML, CSS, and JavaScript. It allows users to convert the currency of one country to another by utilizing an external API.
Check out the live demo of the Currency Converter: click here
- Convert currency values between different countries.
- Fetch real-time exchange rates using an API.
- Simple and user-friendly interface.
https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies/{fromcountry}.json
To fetch the exchange rates, the following code is used:
const BASE_URL = "https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies";
const url = `${BASE_URL}/${fromCurr.value.toLowerCase()}.json`;
let response = await fetch(url);
if (!response.ok) {
throw new Error('Network response was not ok');
}
let data = await response.json();
const exchangeRate = data[fromCurr.value.toLowerCase()][toCurr.value.toLowerCase()];
👋 Hi there! I'm Sinchana Chatterjee, an enthusiastic and determined B.Tech student with a fervent aspiration to excel as a Web Developer.
- Thanks to githubs pages for providing a platform to deploy my website.
- Thanks to the open-source community for their invaluable contributions to the tools and libraries used in this project.
If you have any feedback, please reach out to me at csinchana19@gmail.com