batch replace onButtonPressed(Button...

This commit is contained in:
Peli de Halleux
2016-03-29 21:17:57 -07:00
parent 1f7e0b0f79
commit 850c313c5d
68 changed files with 187 additions and 187 deletions

View File

@ -24,7 +24,7 @@ We create a **variable**, `count` to keep track of the current count. The number
```
let count_ = 0
input.onButtonPressed("A", () => {
input.onButtonPressed(Button.A, () => {
count_ = count_ + 1
basic.showNumber(count, 150)
})
@ -40,7 +40,7 @@ We are only pressing on button pressed once. So the number to display on the mic
```
count_ = 0
input.onButtonPressed("A", () => {
input.onButtonPressed(Button.A, () => {
count_ = count_ + 1
basic.showNumber(count_, 100)
})

View File

@ -28,7 +28,7 @@ let count = 0
```
let count_ = 0
input.onButtonPressed("A", () => {
input.onButtonPressed(Button.A, () => {
count_ = count_ + 1
basic.showNumber(count_, 100)
})
@ -42,7 +42,7 @@ input.onButtonPressed("A", () => {
```
count_ = 0
input.onButtonPressed("A", () => {
input.onButtonPressed(Button.A, () => {
count_ = count_ + 1
basic.showNumber(count_, 100)
})

View File

@ -13,7 +13,7 @@ Answers may vary. Generally, on button pressed run code when an input button is
Write the line of code that creates a condition when the BBC micro:bit button A is pressed.
```
input.onButtonPressed("A", () => {
input.onButtonPressed(Button.A, () => {
})
```