+ 4
Alright, did you ever change your tv channel with the remote? Or how do you change them? You place up the remote in front of the tv and click a button, don't you? This is the idea behind switch statement. You are 'switching' to the remote and hence the channel is being changed according to the corresponding button. For example, let's say you click '1' in your tv remote. So certainly, you'll see the first channel. You 'switched' to the remote clicking 1 and so the first channel appears which is our 'case'! Hope that makes sense!
+ 3
It is like a chain of if-else statements
0
in programming context "switch" is a "keyword", not a "tag"... "tag" apply rather to descriptive language context (Html, Xml, Svg) and are keyword in angular braces (ie: <tag>)...



