# JS 2 - > Greater than >= Greater than or equal to ==...

This preview shows pages 1–5. Sign up to view the full content.

CS 170 Lecture 10  Javascript 2 Kristian Stout stouty@rci.rutgers.edu

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Comments in JS Single Line comment:   // your comment Multi-line Comment:   /*    your comment   */
Arithmetic Operators Symbols of basic arithmetic operations: Division / Multiplication * Addition + Subtraction –  we can group operations with parentheses  Multiply and divide are performed before add and subtract JavaScript does not have an operator for exponents We call “Binary operators” those that operate on two values Eg   a+b Unary operators operate on one value eg increment ++   and decrement – (two minuses) can be prefix (--a) or postfix (a++)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Assignment  Operators = += -= *= /= < Less than <= Less than or equal to
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: > Greater than >= Greater than or equal to == Equal to != NOT equal to Comparison Operators Logical Operators Tests two or more relationships at the same time Teenagers are older than 12 and younger than 20 Logical AND Symbol is && Result of (a && b) is true (a bool) if both a and b are true; else the result is false Logical OR Symbol is || Result of (a || b ) is true if either a or b are true; else if BOTH are false, the result is false Logical NOT Symbol is ! It is a unary operator; its result is the opposite logical value of the value it is applied to...
View Full Document

## This note was uploaded on 02/21/2012 for the course 198 170 taught by Professor Kristianstout during the Fall '10 term at Rutgers.

### Page1 / 5

JS 2 - > Greater than >= Greater than or equal to ==...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online