pxt-core-own
Version:
Microsoft MakeCode, also known as Programming Experience Toolkit (PXT), provides Blocks / JavaScript tools and editors
30 lines (22 loc) • 727 B
Markdown
value of a variable by some amount.
```block
let x = 0
x += 2
```
The change blocks increase the value in the variable by the amount you want. This is also
known as an _addition assignment_ operation.
Use the change operator to set a new, larger value to a [variable](/blocks/variables/var).
If you **`let`** a variable have a value of `1`, the change block makes the value change
by `2` like this:
```block
let x = 1
x += 2
```
You can use the change operator with variables of each of the supported [types](/types).
[ ](/blocks/variables/var), [Assignment operator](/blocks/variables/assign)
Change, meaning increase, the