DEV Community

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

Collapse
 
ajayv1 profile image
Ajay Kumar Verma

Actually, I have taken the more general case when the clubbing is not possible i.e it could be the first object and 2nd object are seperate and coming from different files or place.

for this case though, we could have club the data.

Thanks for the suggestion!