4 ms·
The switch example seems odd to me, since in that case getting rid of the `do` expression and using returns turns out to be shorter than futzing around with bre
by danShumway 8y ago
The switch example seems odd to me, since in that case getting rid of the `do` expression and using returns turns out to be shorter than futzing around with breaks.
const value = (() => {
switch (someString) {
case 'Monday':
return 0;
case 'Tuesday':
return 1;
...
}
})();