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 | Sololearn: Learn to code for FREE!

+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

4/10/2021 7:56:10 PM

Тимур Завьялов

2 Answers

New Answer

+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]);

+2

JaScript, thank you)👍