1.2 KiB
1.2 KiB
statements, operators, and libaries
Statements, operators, and libraries.
@parent javascript/language
TouchDevelop functions include statements and operators.
Statements
TouchDevelop statements include:
- break, to exit a loop before it has completed, usually used in conjunction with an if statement
- if conditional statement
- for and while loops
- function
- return
- var (local variable declaration)
Operators
TouchDevelop operators include:
- assignment operator
:=
(to update variables) - arithmetic operators (
+
,-
,*
,/
, mod) operate on Numbers - comparison operators (such as
>
,=
) operate on Numbers - boolean operators (
not
,or
,and
) operate on Booleans - concat operator combines Strings
Libraries
Libraries provide additional functions:
- the @boardname@ library
- the math and bits libraries