pxt-calliope/olddocs/js/statements.md
2017-03-07 10:17:01 -08:00

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:

see also

TouchDevelop Documentation, comments