Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 963 Bytes

operatorsandloops.md

File metadata and controls

18 lines (14 loc) · 963 Bytes

Operators and Loops

Expressions and Operators

  • JS has both binary and unary operators, and one special ternary operator
  • A binary operator requires two operands, one before the operator and one after the operator
  • A unary operator requires a single operand, either before or after the operator
  • For more examples visit Expressions and Operators

Loops

  • Loops offer a quick and easy way to do something repeatedly
  • There are different kinds of loops but they essentially do the same thing: repeat and action some number of times

For statement

  • A FOR statement repeats until something evaluates to false

While statement

  • A WHILE statement executes its statement as long as a specified condition evaluates to TRUE

  • For more examples visit Loops