Introduction to Conditionals
Explore how to use JavaScript conditionals to control the flow of your programs. This lesson covers if else statements and ternary operators, helping you execute specific tasks based on different scenarios in your code.
We'll cover the following...
We'll cover the following...
Background
A programmer always wants to control the flow of the program. When she codes, she wants to put as little effort as possible to translate her ideas into lines of code.
Let’s imagine that we want to write a program to solve a problem. Let’s ...