Javascript Reference Card Page 6

ADVERTISEMENT

OPERATORS
COMPARISON
= =
Returns true if the operands are equal
!=
Returns true if the operands are not equal
ARITHMETIC
= = =
Returns true if the operands are equal and the
+
addition
adds two numbers
same data type
subtraction
subtracts one number from
! = =
Returns true if the operands are not equal and/or
another
not the same data type
*
multiplication
multiplies two numbers
>
Returns true if the first operand is greater than
/
division
divides one number by another
the second
%
modulus
returns the integer remainder
> =
Returns true if the first operand is greater than or
after dividing two numbers
equal to the second
+ +
increment
adds one to a numeric variable
<
Returns true if the first operand is less than the
decrement
subtracts one from a numeric
second
variable
< =
Returns true if the first operand is less than or
equal to the second
STRING
+
concatenation
concatenates or joins two
ASSIGNMENT
strings or other elements
=
Assigns the value of the seond operand to the
+ =
concatenation/
concatenates two string
first operand
assignment
variables and assigns the
+ =
Adds two numeric operands and assigns the
result to the first variable
result to the first operand
– =
Subtracts the second operand from the first, and
LOGICAL
assigns the result to the first
&&
logical AND
Compares two operands;
* =
Multiplies two operands, assigns the result to the
returns true if both are true,
first
otherwise returns false
/ =
Divides the first operand by the second, assigns
||
logical OR
Compares two operands;
the result to the first
returns true if either operand
% =
Finds the modulus of two numeric operands, and
is true, otherwise returns false
assigns the result to the first
!
logical NOT
Returns false if its operand
can be converted to true,
RESERVED WORDS
otherwise returns false
abstract
else
instanceof
switch
boolean
enum
int
synchronized
break
export
interface
this
byte
extends
long
throw
case
false
native
throws
catch
final
new
transient
char
finally
null
true
class
float
package
try
const
for
private
typeof
continue
function
protected
var
debugger
goto
public
void
default
if
return
volatile
delete
implements
shor
while
do
import
static
with
double
in
super
6

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 6