File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1313
1414// =============> write your explanation here
1515// The function multiply does not return a value, it only logs the result to the console.
16- // Therefore on using the template literal to write the result of the function, it doesn't
17- // have one and renders "undefined" instead
16+ // Therefore, on using the template literal to write the result of the function, it doesn't
17+ // have this result and renders "undefined" instead
1818
1919
2020// Finally, correct the code to fix the problem
Original file line number Diff line number Diff line change 11// Predict and explain first...
22// =============> write your prediction here
3- // the semicolon after "return" will hamper the return statement because it
4- // will end the statement before it has been defined what it needs to return.
3+ // the semicolon after "return" will hamper the return statement because this
4+ // character will end the statement before receiving a definition of what it
5+ // needs to return.
56
67
78function sum ( a , b ) {
Original file line number Diff line number Diff line change 1+ // This program should tell the user the last digit of each number.
2+ // Explain why getLastDigit is not working properly - correct the problem
13// Predict and explain first...
24
35// Predict the output of the following code:
46// =============> Write your prediction here
57// The "const" is hampering the function getLastDigit because the return
6- // function will always calculate with the value of the const and ignore any
7- // other input
8+ // function will always use the value of the const for its calculations and
9+ // ignore any other input
810
911
1012
@@ -20,7 +22,7 @@ console.log(`The last digit of 806 is ${getLastDigit(806)}`);
2022
2123// Now run the code and compare the output to your prediction
2224// =============> write the output here
23- //The last digit of 42 is 3
25+ // The last digit of 42 is 3
2426// The last digit of 105 is 3
2527// The last digit of 806 is 3
2628
@@ -41,5 +43,3 @@ console.log(`The last digit of 42 is ${getLastDigit(42)}`);
4143console . log ( `The last digit of 105 is ${ getLastDigit ( 105 ) } ` ) ;
4244console . log ( `The last digit of 806 is ${ getLastDigit ( 806 ) } ` ) ;
4345
44- // This program should tell the user the last digit of each number.
45- // Explain why getLastDigit is not working properly - correct the problem
You can’t perform that action at this time.
0 commit comments