Update script.js
Browse files
script.js
CHANGED
@@ -31,6 +31,10 @@ function swapCurrencies() {
|
|
31 |
const fromCurrency = document.getElementById('from-currency');
|
32 |
const toCurrency = document.getElementById('to-currency');
|
33 |
|
|
|
|
|
|
|
|
|
34 |
// Swap currency values
|
35 |
const temp = fromCurrency.value;
|
36 |
fromCurrency.value = toCurrency.value;
|
|
|
31 |
const fromCurrency = document.getElementById('from-currency');
|
32 |
const toCurrency = document.getElementById('to-currency');
|
33 |
|
34 |
+
// Log swap operation to console for debugging
|
35 |
+
console.log("Swapping currencies...");
|
36 |
+
console.log(`From: ${fromCurrency.value}, To: ${toCurrency.value}`);
|
37 |
+
|
38 |
// Swap currency values
|
39 |
const temp = fromCurrency.value;
|
40 |
fromCurrency.value = toCurrency.value;
|