From 442f30541454a8cba8937cf1c1b5eb25d104f7aa Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 6 Feb 2018 17:03:13 -0800 Subject: [PATCH] removing dangling doc page --- docs/types/var.md | 49 ----------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 docs/types/var.md diff --git a/docs/types/var.md b/docs/types/var.md deleted file mode 100644 index 2f524e49..00000000 --- a/docs/types/var.md +++ /dev/null @@ -1,49 +0,0 @@ -# @extends - -### #letexample - -A variable is created for the number returned by the [brightness](/reference/led/brightness) function. - -```block -let b = led.brightness(); -``` - -### #readvariableexample - -For example, the following code shows the value stored in `counter` on the LED screen: - -```blocks -let counter = 1; -basic.showNumber(counter); -``` - -### #updatevariableexample - -The following code sets `counter` to 1 and then increments `counter` by 10: - -```block -let counter = 1; -counter = counter + 10; -basic.showNumber(counter); -``` - -### #whyusevariablesexample - -A counter is a great example: - -```block -let counter = 0; -input.onButtonPressed(Button.A, () => { - counter = counter + 1; - basic.showNumber(counter); -}); -``` - -### #localvariableexample -```block -// x does NOT exist here. -if (led.brightness() > 128) { - // x exists here - let x = 0; -} -```