-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrays.html
More file actions
32 lines (23 loc) · 706 Bytes
/
arrays.html
File metadata and controls
32 lines (23 loc) · 706 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">
<title>Title</title>
</head>
<body>
<script>
var shapes = ['square', 'rectangle', 'circle', 'triangle'];
console.log('There are ' + shapes.length + ' shapes in the array');
console.log('The first shape is: ' + shapes[0]);
// The first shape is: square
console.log('The second shape is: ' + shapes[1]);
// The second shape is: rectangle
console.log('The third shape is: ' + shapes[2]);
// The third shape is: circle
console.log('The fourth shape is: ' + shapes[3]);
// The fourth shape is: triangle
console.log('The fifth shape is: ' + shapes[4]);
// The fifth shape is: undefined
</script>
</body>
</html>