pxt-calliope/docs/reference/js/statements.md
2016-03-25 16:47:20 -07:00

1.4 KiB

statements, operators, and libaries

Statements, operators, and libraries. #docs #statements #operators #library

@parent js/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