Skip to content

Commit b365bea

Browse files
fixed prettier on 2.2.js
1 parent 95869ba commit b365bea

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • Sprint-3/2-mandatory-debug

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Predict and explain first
1+
// Predict and explain first
22
// As per the code output should be the last digits of the given number .
33

44
// Predict the output of the following code:
@@ -27,14 +27,13 @@
2727
// Finally, correct the code to fix the problem
2828
// =============> write your new code here
2929
function getLastDigit(num) {
30-
return num.toString().slice(-1);
30+
return num.toString().slice(-1);
3131
}
3232

3333
console.log(`The last digit of 42 is ${getLastDigit(42)}`);
3434
console.log(`The last digit of 105 is ${getLastDigit(105)}`);
3535
console.log(`The last digit of 806 is ${getLastDigit(806)}`);
3636

37-
3837
// This program should tell the user the last digit each number.
3938
// Explain why getLastDigit is not working properly - correct the problem
4039
// To solve this problems we need to write variable in function.

0 commit comments

Comments
 (0)