Switch statement is the another part of condition type statements other than if-else condition statements.In technical language "A Switch statement allows a variable to be tested for equality against a list of values. "
Click on the link to know about the: Rules applied on switch statements 🌝🌝🌝
The syntax of Switch statements looks like that:
switch(expression)
{
case value: //statements
//another value
case value: //statements
default: //optional statements like else part
}
{
case value: //statements
//another value
case value: //statements
default: //optional statements like else part
}
Click on the link to know about the: Rules applied on switch statements 🌝🌝🌝
No comments:
Post a Comment