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 81f3b3d commit 7a71bbaCopy full SHA for 7a71bba
Week3/homework-solutions/5-step3.js
@@ -1,11 +1,11 @@
1
'use strict';
2
3
-// note: prefer const and let over var
+// note: prefer const and let over let
4
function multiplyAll(arr) {
5
- var product = 1;
6
- for (var i = 0; i < arr.length; i++) {
7
- var innerArray = arr[i];
8
- for (var j = 0; j < innerArray.length; j++) {
+ let product = 1;
+ for (let i = 0; i < arr.length; i++) {
+ const innerArray = arr[i];
+ for (let j = 0; j < innerArray.length; j++) {
9
product *= innerArray[j];
10
}
11
Week3/homework-solutions/6-step3.js
@@ -17,7 +17,6 @@ const printArray2d = printArray;
17
const printArray3d = printArray;
18
19
printArray2d(arr2d);
20
-
21
printArray3d(arr3d);
22
23
// Do not change or remove the next lines
0 commit comments