Skip to content

Commit 97bdb37

Browse files
authored
Fixing typo
Corrected the function getLastDigit to properly accept a parameter.
1 parent 54e11ce commit 97bdb37

File tree

1 file changed

+1
-1
lines changed
  • Sprint-2/2-mandatory-debug

1 file changed

+1
-1
lines changed

Sprint-2/2-mandatory-debug/2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ console.log(`The last digit of 806 is ${getLastDigit(806)}`);
2424
// =============> the variable num is assigned to the value 103 in the global scope and not assigned to any value in the function scope
2525
// Finally, correct the code to fix the problem
2626
// =============> write your new code here
27-
function getLastDigit(num) { // we add the identier num as parameter to the function getLastDigit
27+
function getLastDigit(num) { // we add the identifier num as parameter to the function getLastDigit
2828
return num.toString().slice(-1);
2929
}
3030

0 commit comments

Comments
 (0)