DEV Community

Discussion on: Switch statements in javascript – How to refactor?

 
frankwisniewski profile image
Frank Wisniewski • Edited

Yes Sir, an array works well for months, days, etc.
The weekday example is not good...

Thread Thread
 
ajayv1 profile image
Ajay Kumar Verma

Updating the code.