-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathaula06.01.html
More file actions
30 lines (21 loc) · 750 Bytes
/
aula06.01.html
File metadata and controls
30 lines (21 loc) · 750 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
<!doctype html>
<html>
<head>
<title>Logica de Programação Javascript</title>
<meta charset="utf-8">
</head>
<body>
<h1>Lógica de programação com Javascript</h1>
<div id="output"></div>
</body>
<script>
var produtos = new Array('caneta', 'lapis', 'tesoura', 'borracha', 'caderno', 'livro');
produtos.push('compasso', 'cartolina')
var output = document.querySelector('#output');
var msg = '';
for (var i = 0; i < produtos.length; i++){
msg += 'produto ' + (i + 1) + ': '+ produtos[i] +' <br>';
}
output.innerHTML = msg;
</script>
</html>