We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d91901 commit 1ede9b9Copy full SHA for 1ede9b9
1 file changed
Sprint-2/1-key-errors/1.js
@@ -23,9 +23,7 @@
23
// Finally, correct the code to fix the problem
24
// =============> write your new code here
25
function convertToPercentage(decimalNumber) {
26
- decimalNumber = 0.5;
27
- const percentage = `${decimalNumber * 100}%`;
28
- return percentage;
+ return `${decimalNumber * 100}%`;
29
}
30
-
31
-console.log(convertToPercentage(0.5))
+// i have also removed the reassignment of decimal number "decimalNumber = 0.5;" so we can pass any number in the function
+console.log(convertToPercentage(1.5));
0 commit comments