+ 1
What is a switch statement
when and why is it used
3 Antworten
+ 8
@Charan thanks for helping thanks for sharing your knowledge.
+ 3
Switch statements are like “if statements “. However, you use switch statements to alternate user inputs or selections with a predefined array of string laterals, numbers or anything .For example, you can say when an option or case is 100 , switch to “A” or when a case is 49, switch to “F” grade.