Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Boolean Data Type

Get Embed Code
14 Languages

Showing Revision 3 created 05/24/2016 by Udacity Robot.

  1. After you type it out,
    it should look something like this.
  2. Hopefully you also thought about
    what each line of code was doing.
  3. This line of code creates a new boolean
    variable called hasWhippedCream and
  4. the initial value is false.
  5. On the next line,
    we take that same variable and
  6. then we update it to have a true value.
  7. And then we update it again
    to have a false value.
  8. You can update it as many times as
    you want, just like you can update
  9. the integer or string variables
    as many times as you want.
  10. As for use cases, I showed you
    a couple on my phone already, so
  11. hopefully you found some on your own.