-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatriz.html
More file actions
32 lines (26 loc) · 919 Bytes
/
matriz.html
File metadata and controls
32 lines (26 loc) · 919 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
27
28
29
30
31
32
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Matriz_Javascript</title>
<script>
var mochila = [];
var item1 = ["Corda", 2],
item2 = ["Faca", 1],
item3 = ["Prego", 5],
item4 = ["Alicate", 28];
mochila.push(item1); // adicionando_os_itens_na_mochila
mochila.push(item2);
mochila.push(item3);
mochila.push(item4);
document.write(mochila [0][0] + "-" + mochila [0][1] + "<br>");
document.write(mochila [1][0] + "-" + mochila [1][1] + "<br>");
document.write(mochila [2][0] + "-" + mochila [2][1] + "<br>");
document.write(mochila [3][0] + "-" + mochila [3][1] + "<br>");
</script>
</head>
<body>
</body>
</html>