-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathindex.html
39 lines (28 loc) · 1.03 KB
/
index.html
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
37
38
39
<!DOCTYPE html>
<html>
<body>
<h1>Setting Elements in an Array</h1>
<script>
/*
PROBLEM 1: Create an empty array named colors to be used further.
*/
//ENTER YOUR CODE HERE
/*
PROBLEM 2: Populate the simple array named colors with the values red, green and blue in that order. Log out the content of the array colors.
*/
//ENTER YOUR CODE HERE
/*
PROBLEM 3: Create and populate a simple array named numbers with the initial values of 7, 5, 12 and 22. In the following statement, update the value 5 to 9 and log out the new array.
*/
//ENTER YOUR CODE HERE
/*
PROBLEM 4: Create a simple array named planets. Have planets contain three objects, each with property planetName and the values, Mars, Earth and Venus. Log out the content of the array planets
*/
//ENTER YOUR CODE HERE
/*
PROBLEM 5 (DEBUGGING): Trying to display just the planetName with value Earth. Uncomment before running.
*/
// console.log(planets[planetName.Earth])
</script>
</body>
</html>