In english ongeacht taal van blokken.
let countA = 0
let countB = 0
input.onButtonPressed(Button.B, function () {
countB += 1
basic.showNumber(countB)
})
input.onButtonPressed(Button.A, function () {
countA += 1
basic.showNumber(countA)
})
basic.showNumber(0)
let tel = 0
input.onButtonPressed(Button.A, function () {
omhoog()
basic.showNumber(tel)
})
function omhoog() {
tel += 1
}
input.onButtonPressed(Button.B, function () {
omlaag()
basic.showNumber(tel)
})
function omlaag() {
tel += -1
}
tel = 0
basic.showNumber(tel)
Download screenshot has transparent background. Use this instead of PrintScrren
Als commentare in javascript, schakel tot block en terug, zie commentare niet meer.