Skip to content

Commit 49deb35

Browse files
authored
Fix undefined decimalNumber in main function
Define decimalNumber in the main function to avoid undefined error.
1 parent 066a39e commit 49deb35

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • Sprint-2/1-key-errors

Sprint-2/1-key-errors/1.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ function convertToPercentage(decimalNumber) {
1515
console.log(decimalNumber);
1616

1717
// =============> write your explanation here
18+
// [ChunYanWong] decimalNumber is undefined in the main function so error will occur
19+
1820

1921
// Finally, correct the code to fix the problem
2022
// =============> write your new code here
23+
// [ChunYanWong] Add const decimalNumber = 0.5 in the main function
24+

0 commit comments

Comments
 (0)