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 25bda16 commit db3249aCopy full SHA for db3249a
Sprint-2/1-key-errors/1.js
@@ -21,13 +21,13 @@
21
// Finally, correct the code to fix the problem
22
// =============> write your new code here
23
24
-function convertToPercentage() {
25
- const decimalNumber = 0.5;
26
- const percentage = `${decimalNumber * 100}%`;
+function convertToPercentage(num) {
+
+ const percentage = `${num * 100}%`;
27
28
return percentage;
29
}
30
31
-console.log(convertToPercentage());
+console.log(convertToPercentage(0.1));
32
33
-// the new code runs without error and outputs "50%"
0 commit comments