-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise15.html
More file actions
30 lines (26 loc) · 1.01 KB
/
Exercise15.html
File metadata and controls
30 lines (26 loc) · 1.01 KB
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
27
28
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Exercise 15</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<script type="text/javascript">
/*
Crear un programa que reciba el nombre y las calificaciones de 3 personas.
Para cada persona deberá guardar la información en una tupla.
El programa no mostrará resultados de salida.
*/
let califications = new Array()
for (let i = 1; i <= 3; i++) {
let name = prompt('Ingresa el nombre de la persona ' + i);
let calification = parseFloat(prompt('Ingresa la nota de la persona '+ i));
califications.push({'name': name, 'calification': calification});
}
alert(califications[0].name);
</script>
</body>
</html>