You can combine boolean operators in your expressions. Combinations like

(x && (y || w)) && z

are not only legal expressions, but are extremely useful tools for your programs.

These expressions may take some getting used to, but you can always use parentheses to control the order of evaluation. Expressions in parentheses are always evaluated before anything outside parentheses.



Last one! Set each variable to true or false depending on what value you expect the expression to return.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?