HTML and CSS Reference
In-Depth Information
Operators
Description
>=
Returns true when the expression on the left is greater than or equal
to the expression on the right ( x >= y )
<=
Returns true when the expression on the left is less than or equal to
the expression on the right ( x <= y )
Conditional
Operators used to determine values based on conditions that are
either true or false
( condition ) ? value1 : value2
If condition is true, then this expression equals value1 ; otherwise it
equals value2
Keywords
JavaScript keywords are reserved by JavaScript
infinity
Represents positive infinity (often used with comparison operators)
this
Refers to the current object
var
Declares a variable
with
Allows the declaration of all the properties for an object without
directly referencing the object each time
Logical
Operators used for evaluating true and false expressions
^
Returns true if two Boolean expressions do not have the same value
!
Reverses the Boolean value of the expression
&&
Returns true only if both expressions are true (also known as an AND
operator)
||
Returns true when either expression is true (also known as an OR
operator)
|
Returns true if the expression is false and false if the expression is
true (also known as a NEGATION operator)
Syntax
Syntactical elements
;
Indicates the end of a command line
/* comments */
Encloses multiline comments within a JavaScript program
// comments
Marks a single line of comments
Search WWH ::




Custom Search