more doc fixes

This commit is contained in:
Peli de Halleux 2016-04-13 08:51:40 -07:00
parent 18e637aa28
commit 8c00942c39
3 changed files with 5 additions and 15 deletions

View File

@ -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.
```blocks
let degrees = 0;
basic.forever(() => {
degrees = input.compassHeading();
let degrees = input.compassHeading();
if (degrees < 45) {
basic.showString("N");
}
@ -41,9 +40,8 @@ If `degrees` is less than 135, the micro:bit is mostly pointing East. Display `E
```blocks
let degrees = 0;
basic.forever(() => {
degrees = input.compassHeading();
let degrees = input.compassHeading();
if (degrees < 45) {
basic.showString("N");
}
@ -57,9 +55,8 @@ If `degrees` is less than 225, the micro:bit is mostly pointing South. Display `
```blocks
let degrees = 0;
basic.forever(() => {
degrees = input.compassHeading();
let degrees = input.compassHeading();
if (degrees < 45) {
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.
```blocks
let degrees = 0;
basic.forever(() => {
degrees = input.compassHeading();
let degrees = input.compassHeading();
if (degrees < 45) {
basic.showString("N");
}

View File

@ -31,7 +31,7 @@ Let's add a pause. Then show the value of the the count.
```blocks
let count = 0;
let count = 0;
while (count < 10) {
basic.pause(100);
basic.showNumber(count)

View File

@ -38,16 +38,10 @@ This function has comments that describe the purpose of the function:
* @param x TODO
*/
export function square(x: number) : number {
let result: number
return x * x
return result
}
```
### Formatting
Use [markdown syntax](/js/markdown) to format your comments (for example, **bold** and *italic* formatting).
### Commenting out code
During the debugging process, you may want to comment out a section of your code so that it doesn't run.