mukul0596 / frontend-101

0 stars 0 forks source link

B1 review #12

Open mukul0596 opened 5 years ago

kunal-mohta commented 5 years ago

These lines in every case of the switch block are essentially the same, with a few parameters changing. This is making the code repetitive. Can you refactor it to have a common function doing these tasks?