Determines if the switch has been flipped on or off.
toggleSwitch.isOpen()
is a boolean property. It returns true
if the switch is flipped on, otherwise it returns false
. The switch has a little plus and minus side by it to help you remember which side is which.
toggleSwitch.isOpen
Boolean
toggleSwitch.isOpen()
is in the context of a conditional.Found a bug in the documentation? Let us know at documentation@code.org