-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path6-log-animals.js
More file actions
25 lines (10 loc) · 812 Bytes
/
6-log-animals.js
File metadata and controls
25 lines (10 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* Follow the commented steps to write a piece of code.
*/
// 1. Declare variable and assign to it an empty array. Make sure that the name of the variable indicates it contains more than 1 item. For example items instead of item.
// 2. Write a console.log statement that explains in words what you think the value of the array is.
// 3. Write a console.log statement that logs the array.
// 4. Create a new variable with an array that has 3 of your favorite animals, each in a different string. Make sure the name of the variables says something about what the variable contains.
// 5. Write a console.log statement that logs the second array.
// 6. Add a statement that adds another string ("Piglet)" to the array of animals.
// 7. Write a console.log statement that logs the second array!