Skip to content

Commit c845780

Browse files
committed
refactor: convert convertToPercentage to arrow function for conciseness
1 parent 8c00d6c commit c845780

File tree

1 file changed

+6
-3
lines changed
  • Sprint-2/1-key-errors

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@
3030

3131

3232

33-
function convertToPercentage(num) {
34-
return `${num * 100}%`;;
35-
}
33+
// function convertToPercentage(num) {
34+
// return `${num * 100}%`;;
35+
// }
36+
37+
38+
const convertToPercentage = (num) => `${num * 100}%`;
3639

3740
console.log(convertToPercentage(0.80));

0 commit comments

Comments
 (0)