diff --git a/docs/types/number.md b/docs/types/number.md index fe018e5a..4381fd06 100644 --- a/docs/types/number.md +++ b/docs/types/number.md @@ -5,6 +5,22 @@ The [show number](/reference/basic/show-number) function displays a number on the [LED screen](/device/screen). For example, this code displays the number 42: -```blocks +```block basic.showNumber(42); ``` + +### #declareexample + +```block +let num = 42; +basic.showNumber(42); +``` + +### #functionreturnexample + +For example the following code gets the display brightness +(using the [brightness function](/reference/led/brightness)) and stores the value in a variable named `brightness`: + +```block +let brightness = led.brightness() +``` diff --git a/docs/types/var.md b/docs/types/var.md new file mode 100644 index 00000000..639456de --- /dev/null +++ b/docs/types/var.md @@ -0,0 +1,9 @@ +# @extends + +### #letexample + +A variable is created for the number returned by the [brightness](/reference/led/brightness) function. + +```block +let b = led.brightness(); +```