more doc fixes
This commit is contained in:
parent
18e637aa28
commit
8c00942c39
@ -28,9 +28,8 @@ basic.forever(() => {
|
|||||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the micro:bit.
|
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the micro:bit.
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
let degrees = 0;
|
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
degrees = input.compassHeading();
|
let degrees = input.compassHeading();
|
||||||
if (degrees < 45) {
|
if (degrees < 45) {
|
||||||
basic.showString("N");
|
basic.showString("N");
|
||||||
}
|
}
|
||||||
@ -41,9 +40,8 @@ If `degrees` is less than 135, the micro:bit is mostly pointing East. Display `E
|
|||||||
|
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
let degrees = 0;
|
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
degrees = input.compassHeading();
|
let degrees = input.compassHeading();
|
||||||
if (degrees < 45) {
|
if (degrees < 45) {
|
||||||
basic.showString("N");
|
basic.showString("N");
|
||||||
}
|
}
|
||||||
@ -57,9 +55,8 @@ If `degrees` is less than 225, the micro:bit is mostly pointing South. Display `
|
|||||||
|
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
let degrees = 0;
|
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
degrees = input.compassHeading();
|
let degrees = input.compassHeading();
|
||||||
if (degrees < 45) {
|
if (degrees < 45) {
|
||||||
basic.showString("N");
|
basic.showString("N");
|
||||||
}
|
}
|
||||||
@ -76,9 +73,8 @@ basic.forever(() => {
|
|||||||
If none of these conditions returned true, then the micro:bit must be pointing West. Display `W` on the micro:bit.
|
If none of these conditions returned true, then the micro:bit must be pointing West. Display `W` on the micro:bit.
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
let degrees = 0;
|
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
degrees = input.compassHeading();
|
let degrees = input.compassHeading();
|
||||||
if (degrees < 45) {
|
if (degrees < 45) {
|
||||||
basic.showString("N");
|
basic.showString("N");
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ Let's add a pause. Then show the value of the the count.
|
|||||||
|
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
let count = 0;
|
let count = 0;
|
||||||
while (count < 10) {
|
while (count < 10) {
|
||||||
basic.pause(100);
|
basic.pause(100);
|
||||||
basic.showNumber(count)
|
basic.showNumber(count)
|
||||||
|
@ -38,16 +38,10 @@ This function has comments that describe the purpose of the function:
|
|||||||
* @param x TODO
|
* @param x TODO
|
||||||
*/
|
*/
|
||||||
export function square(x: number) : number {
|
export function square(x: number) : number {
|
||||||
let result: number
|
|
||||||
return x * x
|
return x * x
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Formatting
|
|
||||||
|
|
||||||
Use [markdown syntax](/js/markdown) to format your comments (for example, **bold** and *italic* formatting).
|
|
||||||
|
|
||||||
### Commenting out code
|
### Commenting out code
|
||||||
|
|
||||||
During the debugging process, you may want to comment out a section of your code so that it doesn't run.
|
During the debugging process, you may want to comment out a section of your code so that it doesn't run.
|
||||||
|
Loading…
Reference in New Issue
Block a user