update docs
This commit is contained in:
parent
2742dba0c4
commit
4dbd691146
@ -20,21 +20,29 @@ to select. You also narrow down the set of functions by typing, as below:
|
|||||||
|
|
||||||
![](/static/mb/js/basicIntell.png)
|
![](/static/mb/js/basicIntell.png)
|
||||||
|
|
||||||
# Function parameters
|
## Function arguments
|
||||||
|
|
||||||
You might have noticed that the call `showString` above takes one value,
|
You might have noticed that the call `showString` above takes one argument,
|
||||||
the string to be scrolled on the LED screen. There is a second (optional)
|
the string to be scrolled on the LED screen. There is a second (optional)
|
||||||
parameter that controls the speed of the scroll. Try this:
|
argunment that controls the speed of the scroll. Try this:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
basic.showString("Hello!",50)
|
basic.showString("Hello!",50)
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't give a value for an optional parameter, where does its value
|
If you don't give a value for an optional argument, where does its value
|
||||||
come from? TBD.
|
come from?
|
||||||
|
|
||||||
You might have noticed that the function list above shows all
|
## Left and right parentheses, please!
|
||||||
the available parameters for each function.
|
|
||||||
|
Whenever you want to call a function, you give the name of the function
|
||||||
|
followed by `(` and ending with `)`. Inbetween the left and right
|
||||||
|
parentheses go the function arguments. If a function has zero arguments, you still
|
||||||
|
need the parentheses. For example
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
basic.clearScreen()
|
||||||
|
```
|
||||||
|
|
||||||
### ~button /js/sequence
|
### ~button /js/sequence
|
||||||
NEXT: Sequencing Commands
|
NEXT: Sequencing Commands
|
||||||
|
Loading…
Reference in New Issue
Block a user