Statements
The following JavaScript statements are supported for the micro:bit:
Variable declarations
Block-structured statements
{ }
block statementif-else
conditional statementwhile
loopdo-while
loopfor(;;)
loopswitch
statement (on numbers only)