From 4b01210b0d269ba4092c8de6a7564802198e00ec Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 21 Mar 2017 09:11:24 -0700 Subject: [PATCH] fixing docs issues --- docs/types/number.md | 18 +++++++++++++++++- docs/types/var.md | 9 +++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 docs/types/var.md 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(); +```