-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharraysJS.html
More file actions
36 lines (28 loc) · 1020 Bytes
/
arraysJS.html
File metadata and controls
36 lines (28 loc) · 1020 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
33
34
35
36
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Arrays in JS</title>
</head>
<body>
<h1>Arrays in JS</h1>
<p id="test">TEST AREA</p>
<button onclick="test()">Test</button>
<h3 id="who">Name Area</h3>
<button onclick="changeName()">Name</button>
<h3 id="properties">Arrays have length and sort() properties</h3>
<button onclick="properties()">Properties</button>
<h3 id="looping">Looping arrays</h3>
<button onclick="looping()">Looping</button>
<h3 id="forEachie">Iterating arrays</h3>
<button onclick="forEachie()">forEach</button>
<h3 id="addArray">Adding to arrays using Push or Length</h3>
<button onclick="pushAdd()">Push</button>
<button onclick="lengthAdd()">LengthAdd</button>
<h1>Holes can be added if index is beyond length add</h1>
<h3> JS does not support associative arrays. Don't use names instead of numbered indices!!</h3>
<h3>Use isArray instead of typeof to find if it's an array</h3>
<!-- DON"T CODE BELOW -->
<script src="js/arraysJS.js"></script>
</body>
</html>