|
@@ -1,6 +1,5 @@
|
|
<head>
|
|
<head>
|
|
<h1>closure calc 2</h1>
|
|
<h1>closure calc 2</h1>
|
|
-
|
|
|
|
</head>
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<body>
|
|
@@ -8,7 +7,6 @@
|
|
<select id='to'></select> <br>
|
|
<select id='to'></select> <br>
|
|
<div id='rate'></div><br>
|
|
<div id='rate'></div><br>
|
|
<input type='number' id='amount' /><br>
|
|
<input type='number' id='amount' /><br>
|
|
-
|
|
|
|
<div id='result'></div>
|
|
<div id='result'></div>
|
|
<script>
|
|
<script>
|
|
fetch(`https://open.er-api.com/v6/latest/USD`)
|
|
fetch(`https://open.er-api.com/v6/latest/USD`)
|
|
@@ -22,7 +20,6 @@
|
|
option = document.createElement("option");
|
|
option = document.createElement("option");
|
|
option.innerText = curr1;
|
|
option.innerText = curr1;
|
|
to.append(option);
|
|
to.append(option);
|
|
-
|
|
|
|
let curr1Rates = {};
|
|
let curr1Rates = {};
|
|
crossRates[curr1] = curr1Rates;
|
|
crossRates[curr1] = curr1Rates;
|
|
for (const curr2 in data.rates) {
|
|
for (const curr2 in data.rates) {
|