pxt-calliope/docs/blocks/variables/change.md
2020-08-19 22:03:58 +02:00

14 lines
353 B
Markdown

# @extends
## #examples
## Example: show the value of a variable
Use the assignment operator to set the value of a [variable](/blocks/variables/var). Change the value of a variable from 0 to 1 using the change item block. Then display the new value of the variable on the LED screen. Like this:
```blocks
let x = 0;
x += 1;
basic.showNumber(x);
```