+ 1

Tell me, what I need to enter in line 2 to bind g to s[0] or s[1] or s[2]. And when entering this value, it translated the rate

https://code.sololearn.com/W8xJcE2jPlHW/?ref=app

10th Apr 2021, 7:56 PM
Тимур Завьялов
Тимур Завьялов - avatar
2 Réponses
+ 4
let e = +prompt("Input amount USD"); let g = prompt("Choose EUR=0 or UAN=1 or AZN=2"); let s = ["EUR", "UAN", "AZN"]; let t = [0.84, 27.84, 1.7]; alert (e * t[g]);
10th Apr 2021, 8:13 PM
JaScript
JaScript - avatar
+ 2
JaScript, thank you)👍
10th Apr 2021, 8:20 PM
Тимур Завьялов
Тимур Завьялов - avatar