Skip to content

Commit 117c886

Browse files
committed
Refactor convertToPercentage function to simplify return statement
1 parent a818573 commit 117c886

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • Sprint-3/1-key-errors

‎Sprint-3/1-key-errors/1.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// Finally, correct the code to fix the problem
2727
// =============> write your new code here
2828
function convertToPercentage(decimalNumber){
29-
const percentage = `${decimalNumber * 100}%`;
30-
return percentage;
29+
return `${decimalNumber * 100}%`;
30+
3131
}
3232
console.log(convertToPercentage(0.5));

0 commit comments

Comments
 (0)