You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2024. It is now read-only.
console.log("the value of my array will be: undefined");
3
-
console.log(arr[0]);
4
-
arr=['parrot','fish','dog'];
5
-
console.log(arr[2]);
6
-
arr.push('baby pig');
7
-
console.log(arr[3]);
3
+
console.log(myFavouriteAnimals);
4
+
myFavouriteAnimals=['parrot','fish','dog'];
5
+
console.log(myFavouriteAnimals);
6
+
myFavouriteAnimals.push('baby pig');
7
+
console.log(myFavouriteAnimals);
8
+
9
+
/* 6. Arrays
10
+
6.1 Declare an empty array. Make sure that the name you choose indicates 'plurality', because an array is capable of containing more than one element. (See Naming conventions).
11
+
6.2 Write a console.log statement that explains in words what you think the value of the array is.
12
+
6.3 console.log your array.
13
+
6.4 Create an array that has your favorite animals inside (see if you can find a good name that exactly describes what this variable will hold).
14
+
6.5 Log your array.
15
+
6.6 Add a statement that adds Daan's favorite animal ('baby pig') to the existing array.
0 commit comments