Basics of if:

https://codeeval.dev/gist/021df9cdced87d8f2f3ff4fdd9779824

Basics of switch:

https://codeeval.dev/gist/3a06f43db182d4331a1da637f25a588c

Notice that unlike in C++, case statement doesn’t fall throught to the next case, so you don’t have to put break at the end of each case.

Switch is also used as a type switch.

if statement

switch statement

goto statements