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
Logical operators can be used to control program flow directly. In this video we'll see how.
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
For example, in a browser based game,
0:00
you could test if the time had run out or
the player had to use all their lives.
0:01
If either were true the game would end.
0:06
Likewise with the and operator.
0:10
It makes sure that multiple
conditions are true before
0:12
evaluating the entire conditional
statement to be true.
0:15
Some programmers use boolean
operators to perform what's
0:19
called the Short Circuit.
0:22
It's basically a way to optimize code by
stopping the evaluation of an expression
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