-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise3.html
More file actions
28 lines (22 loc) · 862 Bytes
/
Exercise3.html
File metadata and controls
28 lines (22 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Exercise 3</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<script type="text/javascript">
// Crea un programa que solicite una cantidad en Euros y muestre su equivalente en USD.
let euroMoney = parseInt(prompt('Ingrese una cantidad en Euros'));
function convertEurMoneyToUSD(eurParam) {
let currentDollar = 1.23075;
let result = currentDollar * eurParam;
return result.toFixed(2);
}
alert(`Su equivalente en USD es: ${convertEurMoneyToUSD(euroMoney)}`);
</script>
</body>
</html>