Majstro-Aplikaĵoj
Company info
Home page
JavaScript code examples - Table of contents
Operators
.
(property access)
[ ]
(array index)
( )
(function call)
new
(object creation)
++
(unary increment)
--
(unary decrement)
-
(negation)
~
(bitwise complement operation)
!
(logical complement operation)
delete
(property deletion)
typeof
(data type return)
void
(undefined value return)
*
(multiplication)
/
(division)
%
(division remainder return)
+
(addition)
-
(subtraction)
+
(string concatenation)
<<
(left shift)
>>
(right shift with sign preservation)
>>>
(right shift with zero fill)
<
("less than" comparison)
<
("comes before" lexicographical comparison)
<=
("less than or equal to" comparison)
<=
("comes before or is equal to" lexicographical comparison)
>
("greater than" comparison)
>
("comes after" lexicographical comparison)
>=
("greater than or equal to" comparison)
>=
("comes after or is equal to" lexicographical comparison)
instanceof
(object type check)
in
(property existence check)
==
(equality test)
!=
(inequality test)
===
(identity test)
!==
(non-identity test)
&
(bitwise conjunction
^
(bitwise exclusive disjunction)
|
(bitwise disjunction)
&&
(logical conjunction)
||
(logical disjunction)
? :
(conditional assignment)
=
(assignment)
*=
(assignment with multiplication)
/=
(assignment with division)
%=
(assignment with division and return of remainder)
+=
(assignment with addition)
-=
(assignment with substraction)
+=
(assignment with string concatenation)
<<=
(assignment with left shift)
>>=
(assignment with right shift with sign preservation)
>>>=
(assignment with right shift with zero fill)
&=
(assignment with bitwise conjunction)
^=
(assignment with bitwise exclusive disjunction)
|=
(assignment with bitwise disjunction)
,
(multiple evaluation)
Methods and properties
decodeURI(
string
)
decodeURIComponent(
string
)
encodeURI(
string
)
encodeURIComponent(
string
)
escape(
string
)
(deprecated)
eval(
string
)
Infinity
isFinite(
number
)
isNaN(
value
)
NaN
parseFloat(
string
)
parseInt(
string
)
parseInt(
string
,
int
)
undefined
unescape(
string
)
(deprecated)
Array
()
(
size
)
(
value
, ...)
concat(
value
, ...)
join()
join(
separator
)
length
pop()
push(
value
, ...)
reverse()
shift()
slice(
start
)
slice(
start
,
end
)
sort()
sort(
function
)
toLocaleString()
toString()
unshift(
value
, ...)
EvalError
EvalError()
EvalError(
string
)
message
name
Function
(
arg1
,
arg2
, ...,
argN
,
body
)
length
prototype
toString()
Number
NaN
NEGATIVE_INFINITY
POSITIVE_INFINITY
Object
()
constructor
String
charAt(
position
)
charCodeAt(
position
)
concat(
text
)
fromCharCode(
code1
,
code2
, ...,
codeN
)
indexOf(
text
)
indexOf(
text
,
start
)
lastIndexOf(
text
)
lastIndexOf(
text
,
start
)
length
match(
regexp
)
slice(
from
)
slice(
from
,
to
)
split(
delimiter
)
split(
delimiter
,
limit
)
substring(
from
)
substring(
from
,
to
)
SyntaxError
SyntaxError()
SyntaxError(
string
)
message
name
window
alert(
message
)
blur()
clearInterval(
intervalId
)
close()
closed
confirm(
message
)
defaultStatus
document
frames[]
history
location
Math
name
navigator
opener
parent
prompt(
message
)
screen
self
setTimeout(
code
,
delay
)
status
top
window
window.document
anchors[]
getElementById(
id
)
getElementsByTagName(
name
)
lastModified
title
URL
write(
value
, ...)
writeln(
value
, ...)
window.Math
abs(
number
)
acos(
number
)
asin(
number
)
atan(
number
)
ceil(
number
)
cos(
angle
)
E
exp(
number
)
floor(
number
)
LN10
LN2
LOG10E
LOG2E
PI
pow(
number1
,
number2
)
random()
round(
number
)
sin(
angle
)
sqrt(
number
)
SQRT1_2
SQRT2
tan(
angle
)
Miscellaneous useful examples
Simulating a static variable