colorLeds[i].off()

Category:Circuit Playground

Turns the specified colorLED off.

This method works just like led.off() and will turn whichever LED is specified off. You can turn the colorLED back on with colorLeds[i].on().

Examples

onBoardEvent("buttonL", "press", function(event) {
  colorLeds[8].off();
  colorLeds[9].off();
});

Syntax

colorLeds[index].off()

Found a bug in the documentation? Let us know at documentation@code.org