diff --git a/docs/device/reactive.md b/docs/device/reactive.md index 02fccec7..7825aea1 100644 --- a/docs/device/reactive.md +++ b/docs/device/reactive.md @@ -49,15 +49,13 @@ The micro:bit’s *scheduler* provides the capability to concurrently execute di The first job of the scheduler is to allow multiple *subprograms* to be queued up for later execution . For our purposes, a subprogram is just a statement or sequence of statements in the context of a larger program. Consider the Touch Develop program below for counting button presses. ```blocks -export function countButtonPresses() { - let count = 0 - input.onButtonPressed(Button.A, () => { - count = count + 1 - }) - basic.forever(() => { - basic.showNumber(count, 150) - }) -} +input.onButtonPressed(Button.A, () => { + count = count + 1 +}) +basic.forever(() => { + basic.showNumber(count, 150) +}) +let count = 0 ``` The program above contains three statements that execute in order from top to bottom. The first statement diff --git a/docs/js/call.md b/docs/js/call.md index c5a2d5d8..ebe3ecd7 100644 --- a/docs/js/call.md +++ b/docs/js/call.md @@ -49,7 +49,7 @@ basic.clearScreen() It's a syntax error to have a left parenthesis without the "closing" right parenthesis: -```typescript +``` basic.clearScreen( ``` diff --git a/docs/reference/serial.md b/docs/reference/serial.md index 7ad3fc4f..84abf7e1 100644 --- a/docs/reference/serial.md +++ b/docs/reference/serial.md @@ -5,7 +5,7 @@ Reading and writing data over a serial connection. ```cards serial.writeLine(""); serial.writeNumber(0); -serial.writeValue(x, 0); +serial.writeValue("x", 0); serial.writeString(""); serial.readLine(); serial.redirect(SerialPin.P0, SerialPin.P0, BaudRate.BaudRate115200);