Skip to content

Commit db3249a

Browse files
committed
Updating the task
1 parent 25bda16 commit db3249a

File tree

1 file changed

+5
-5
lines changed
  • Sprint-2/1-key-errors

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
// Finally, correct the code to fix the problem
2222
// =============> write your new code here
2323

24-
function convertToPercentage() {
25-
const decimalNumber = 0.5;
26-
const percentage = `${decimalNumber * 100}%`;
24+
function convertToPercentage(num) {
25+
26+
const percentage = `${num * 100}%`;
2727

2828
return percentage;
2929
}
3030

31-
console.log(convertToPercentage());
31+
console.log(convertToPercentage(0.1));
32+
3233

33-
// the new code runs without error and outputs "50%"

0 commit comments

Comments
 (0)