Computer Science, asked by Hithu6997, 11 months ago

Is it a good practice to end switch with defaults in JavaScript?

Answers

Answered by khushi769
0

Answer:-Is just a waste of time and increases the complexity of the code for no reason. the default case in switch statement is not necessary,but it is useful when no case in switch is satisified or not matched then automatically it executes the default statement,if it is not there ,the switch statement is terminated.

Similar questions