Conditionals 2: 'switch'
Duration:
Created with
Ben Fhala
Ben Fhala is the creative force and founder behind 02geek, a pioneering platform dedicated to making web development accessible to everyone. With over 18 years of experience in the industry, Ben has a deep passion for teaching and a knack for breaking down complex concepts into easy-to-understand lessons.
Conditionals 2: 'switch' Overview
What you'll learn
We have seen various methods to write if conditional depending upon number of conditions which includes if, if..else, else..if, nested..if etc. Switch can be used to replace else..if conditional statement and is used when there are multiple options to make the code simple. In this video, we will learn how to write switch and understand its importance over if conditional in various circumstances. We will also look at keywords such as break and exit, and learn the concept of ternary operation.