LOGICAL OPERATORS: By using and and or to combine expressions, we can make larger and more complex ones!

  • Click Run and open the lock by clicking the buttons in order from top to bottom. Let's set a new code!
  • Find the second if statement in the code editor. This conditional sets the code using
  • Change it so the lock opens when the user enters: blue, red, blue, green, and either yellow OR orange.

NOTE: You may need to scroll from left to right in order to see the full if statement.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)