Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e56828 commit 744f415Copy full SHA for 744f415
Week2/Homework/assets/question-six.js
@@ -1,10 +1,17 @@
1
let nlCities = [];
2
-console.log('the value of the array is 0');
+console.log('the value of the array is undefined');
3
console.log(nlCities);
4
5
const daanFavAnimals = ['lions', 'lynxes', 'Hawks'];
6
console.log(daanFavAnimals);
7
8
daanFavAnimals[3] = 'baby pig';
9
+console.log(daanFavAnimals);
10
+
11
+// The use of push method to add new element to an array
12
+daanFavAnimals.push('Horse');
13
14
15
+// Push method can be applyed on this way too
16
+console.log(daanFavAnimals.push('Frog'));
17
Week2/Homework/assets/question-three.js
@@ -1,7 +1,6 @@
let x;
// x is not defined yet.
-console.log('the value of x will be: 5');
-x = 5;
+console.log('the value of x will be: undefined');
console.log(x);
x = 6;
0 commit comments