STEP 13: Let's add sprinkles! Or not, if that's what you'd prefer. Sounds like we need another if statement!

We can use != in an if statement to check if a value is not equal to another value.

Placing one if statement inside another means they are nested. The one inside only runs if the first one does.

  • Click on LOGIC and go to . Drag out Not Equal? indented in the previous if statement.
  • Change my_var to sprinkles. Change 0 to "". This will be true if the user enters anything for sprinkles.

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)