Welcome his lecture.
I'm going to talk about the multiple case conditions.
Let's get started.
Now, let's say that you want to find the other cities of France as well, to do that, you don't have
to add another case clause to this switch statement.
You can do it by using the multiple case conditions.
Let me show you.
For example, let's say that you want to print France and this is Leon to do that, I'm going to add
a comma like this next to Paris.
Then I just need to type the new Stenning Leon.
That's it.
It's that simple now when our list is Paris or Leon, it will print France or bandstands Tokyo, it
will print Japan.
By the way, you're not only limited to only two conditions here, you can add more if you want, but
don't abuse it and please keep it readable all the time.
Anyway, let me run this for you in the morning, Ed.
OK.
All right, here is the same program, let me run it with Paris first.
OK, it says Paris is located in France.
Good.
Now let's try it with Leon.
As you can see now, it's Prince France again, cool.
Can guess which boolean expression the switch statement uses behind the scenes.
Please post the video and think about it.
Let me show you.
Let's add, Leon, to this if condition here.
As you can see, the multiple conditions here equals to this if condition, right?
It just uses a logical operator.
OK, let's run it now, Gourami Netco Leon.
When I run it with Leon, both statements, Prince, France, this is because the switch and the if
statement here are exactly the same.
All right, the sulphurous lecture.
Well, congrats now you learned about all the basics of the switch statement, perfect, seeing the
next step I.