diff --git a/docs/courses/ucp-science/temperature/setup-procedure.md b/docs/courses/ucp-science/temperature/setup-procedure.md
index 50c5407d..199f103a 100644
--- a/docs/courses/ucp-science/temperature/setup-procedure.md
+++ b/docs/courses/ucp-science/temperature/setup-procedure.md
@@ -108,7 +108,6 @@ In the ``||radio:on radio received||`` event, the temperature is received from s
let temperature = 0
basic.showString("TEMPERATURE RADIO RECEIVER")
radio.setGroup(99)
-let temperature = 0
radio.onDataPacketReceived( ({ receivedNumber: temperature }) => {
basic.showNumber(temperature)
})
diff --git a/docs/device/reactive.md b/docs/device/reactive.md
index dd25eda3..ea878fb2 100644
--- a/docs/device/reactive.md
+++ b/docs/device/reactive.md
@@ -142,7 +142,7 @@ Through this example, we have seen that the micro:bit scheduler enables you to c
As a result, you can easily add a new capability to the micro:bit by just adding a new subprogram. For example, if you want to add a reset feature to the counter program, all you need to do is add a new event handler for a press of button B that sets the global variable "count" to zero, as shown below:
```typescript
-export function countButtonPressesWithReset() {
+function countButtonPressesWithReset() {
let count = 0
input.onButtonPressed(Button.A, () => {
count = count + 1
diff --git a/docs/lessons/glowing-pendulum/quiz-answers.md b/docs/lessons/glowing-pendulum/quiz-answers.md
index fb9f6425..b831727a 100644
--- a/docs/lessons/glowing-pendulum/quiz-answers.md
+++ b/docs/lessons/glowing-pendulum/quiz-answers.md
@@ -21,7 +21,7 @@ We are creating a forever loop to constantly display the appropriate brightness
```blocks
-let acceleration = input.acceleration("y")
+let acceleration = input.acceleration(Dimension.Y)
```
## 3. After storing the acceleration in a variable, write the code to take the absolute value of the acceleration, and store this value inside 'acceleration'.
diff --git a/docs/lessons/zoomer/quiz-answers.md b/docs/lessons/zoomer/quiz-answers.md
index 4b240242..899732b8 100644
--- a/docs/lessons/zoomer/quiz-answers.md
+++ b/docs/lessons/zoomer/quiz-answers.md
@@ -15,7 +15,7 @@ Write the line of code to measure the acceleration and then store in it a variab
```blocks
-let accX = input.acceleration("x")
+let accX = input.acceleration(Dimension.X)
```
Note: acceleration does not have be measured in the "x" direction. It can also be in the "y" or "z" direction.
@@ -27,7 +27,7 @@ After storing the acceleration in a variable, write the code to show acceleratio
```blocks
-let accX = input.acceleration("x")
+let accX = input.acceleration(Dimension.X)
basic.showNumber(accX, 150)
```
diff --git a/docs/projects/karel.md b/docs/projects/karel.md
index ac15c2cc..bc9a3a1a 100644
--- a/docs/projects/karel.md
+++ b/docs/projects/karel.md
@@ -96,6 +96,7 @@ Thanks for playing with Karel the LED!
Copy this code into the JavaScript editor and then download it to the board.
```typescript
+const board = new Board();
/**
* Karel the LED
*/
@@ -132,7 +133,6 @@ function updateLeds() {
}
}
}
-const board = new Board();
enum Direction {
UP = 0,
LEFT,
diff --git a/docs/projects/micro-coin.md b/docs/projects/micro-coin.md
index 8e7e8981..16d638c4 100644
--- a/docs/projects/micro-coin.md
+++ b/docs/projects/micro-coin.md
@@ -84,4 +84,4 @@ The [radio-blockchain](https://makecode.microbit.org/pkg/microsoft/pxt-radio-blo
```package
radio
radio-blockchain=github:Microsoft/pxt-radio-blockchain#master
-```
\ No newline at end of file
+```
diff --git a/docs/reference/pins/analog-pitch.md b/docs/reference/pins/analog-pitch.md
index 654f1ec3..7c201714 100644
--- a/docs/reference/pins/analog-pitch.md
+++ b/docs/reference/pins/analog-pitch.md
@@ -15,7 +15,7 @@ pins.analogPitch(440, 300)
## Example
```blocks
-pins.analogSetPitchPin("P0")
+pins.analogSetPitchPin(AnalogPin.P0);
let frequency1 = 440
let duration = 1000
pins.analogSetPitchPin(AnalogPin.P1);