Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25a8d55

Browse files
Renamed the function
1 parent 8b17d09 commit 25a8d55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Javascript/6-switch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday',
2828
'Friday', 'Saturday', 'Sunday'
2929
];
3030

31-
const getDayWithoutSwitch1 = (n) => (
31+
const getDayWithoutSwitch = (n) => (
3232
(n >= 1) && (n <= 7) ? days[n - 1] : 'Invalid number!'
3333
);
3434

35-
console.log(getDayWithoutSwitch1(2));
35+
console.log(getDayWithoutSwitch(2));

0 commit comments

Comments
 (0)