Skip to content

Commit 416eee5

Browse files
Comment out erroneous code and note declaration issue
Commented out the incorrect code and added a note about the declaration error.
1 parent df6c2f8 commit 416eee5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

  • Sprint-2/1-key-errors

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,19 @@ function convertToPercentage(decimalNumber) {
1616

1717

1818
console.log(decimalNumber);
19+
// =============> it says decimalNumber has aleady been declared for the above reason.
20+
21+
22+
// Finally, correct the code to fix the problem
23+
/* ===========> function convertToPercentage(decimalNumber) {
24+
let decimalNum = 0.5;
25+
const percentage = `${decimalNum * 100}%`;
26+
27+
28+
return percentage;
29+
}
30+
const result = convertToPercentage();
31+
console.log(result);
32+
*/
33+
1934

0 commit comments

Comments
 (0)