Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Exploring JavaScript Conditionals!
You have completed Exploring JavaScript Conditionals!
Preview
We'll look at two "if..then" statements in this video to remind ourselves how they work. In the videos that follow, we'll see how to reform these statements into different conditional patterns.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
JavaScript developer, lifelong learner,
and teacher here at Treehouse.
0:00
I'd like to show you a few ways
to represent decisions in your
0:01
JavaScript code.
0:05
You've already learned how to write an if,
0:07
else statement, to choose between
one scenario and another.
0:09
This is called a conditional because it
does one thing if a condition is true and
0:13
something else if it isn't.
0:17
The paths that's an if, else statement
follows are called branches.
0:20
They branch the flow of your programs
logic in different directions
0:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up