Difference beteeen default and else | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Difference beteeen default and else

what is the difference?

5th May 2017, 1:13 AM
Hélio Ferreira Cabral
Hélio Ferreira Cabral - avatar
1 Answer
+ 5
You can see it as the final else of a switch statement. if no match are found in the cases (which are similar to else if) of the switch, the code will execute the default instruction.
5th May 2017, 1:26 AM
CHMD
CHMD - avatar