pxt-calliope/docs/blocks.md

18 lines
528 B
Markdown
Raw Normal View History

# Blocks language
2016-11-29 09:04:21 +01:00
### @description Language constructs for the Block editor.
2016-08-17 18:44:15 +02:00
2017-01-20 02:51:48 +01:00
Blocks snap into each other to define the program that your @boardname@ will run.
Blocks can be event (buttons, shake, ...) or need to be snapped into an event to run.
The [on-start](/blocks/on-start) event runs first.
```namespaces
for (let i = 0;i<5;++i) {}
if (true){}
let x = 0;
Math.random(5);
2016-08-10 22:10:40 +02:00
```
## See Also
[logic](/blocks/logic), [loops](/blocks/loops), [math](/blocks/math), [variables](/blocks/variables), [on-start](/blocks/on-start)