The "Missing:"s below indicate that an entry is incomplete.
{ ... } | block (grouping statements, especially when statements are not expressions) |
nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
/* ... */ | commenting (non nestable) |
// | commenting (until end of line) |
< > <= >= | comparison |
== === != !== (12) | equality / inequality (shallow) |
VM.garbageCollect() | force garbage collection |
( ... ) | grouping expressions |
eval | runtime evaluation |
case-sensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
CamelCase | tokens (if case sensitive, what is the standard way for scrunching together multiple words) |
[_a-zA-Z$][_a-zA-Z0-9$]* | tokens (variable identifier regexp) |
= | variable assignment or declaration (assignment) |
var | variable assignment or declaration (declaration) |
Missing:
documentation comment
information about the current line and file
comparison (returns 3 values (i.e. inferior, equal or superior))
comparison (min / max (binary or more))
function(a, b) ... | anonymous function |
f(a,b,...) | function call |
f() | function call (with no parameter) |
function f(para1, para2) { ... } | function definition |
return | function return value (breaks the control flow) |
Missing:
function called when a function is not defined (in dynamic languages)
runtime inspecting the caller information
continue / break | breaking control flow (continue / break) |
return | breaking control flow (returning a value) |
try a catch (exn) b | exception (catching) |
throw | exception (throwing) |
if (c) b | if_then |
if (c) b1 else b2 | if_then_else |
c ? b1 : b2 | if_then_else |
do {expr} while (!cond) | loop (do something until condition) |
for | loop (for "a la C" (while + initialisation)) |
while (cond) expr | loop (while condition do something) |
switch (val) { case v1: expr1; break; case v2: case v3: expr23; break; default: expr_else; } | multiple selection (switch) |
, | sequence |
; | sequence |
end-of-line | sequence |
Missing:
loop (for each value in a numeric range, 1 increment (see also the entries about ranges))
loop (for each value in a numeric range, 1 decrement)
loop (for each value in a numeric range, free increment)
this | current instance |
typeof | get the type/class corresponding to an object/instance/value |
delete | manually call an object's destructor |
object.method(para) | method invocation |
object.method() | method invocation (with no parameter) |
new class_name(...) | object creation |
instanceof | testing class membership |
Missing:
object cloning
class declaration
methods available
inheritance
has the method
accessing parent method
Missing:
package scope
declare
import
charAt | accessing n-th character |
fromCharCode | ascii to character |
charCodeAt | character to ascii |
toString | convert something to a string (see also string interpolation) |
String | convert something to a string (see also string interpolation) |
"" + e | convert something to a string (see also string interpolation) |
slice | extract a substring |
mid$ | extract a substring |
indexOf | locate a substring |
lastIndexOf | locate a substring (starting at the end) |
write | simple print (on strings) |
writeln | simple print (on strings) |
+ | string concatenation |
== != | string equality & inequality |
length | string size |
"\n" | strings (end-of-line (without writing the real CR or LF character)) |
'...' | strings (verbatim) |
"..." | strings (verbatim) |
String | type name |
toUpperCase / toLowerCase | upper / lower case character |
toUpperCase / toLowerCase | uppercase / lowercase / capitalized string |
Missing:
strings (with interpolation)
multi-line
serialize (marshaling)
unserialize (un-marshaling)
false / null / undefined / 0 / NaN / "" | false value |
! | logical not |
|| / && | logical or / and (short circuit) |
true / anything not false | true value |
unshift | adding an element at the beginning (list cons) (side-effect) |
push | adding an element at the end (side-effect) |
for (var v in l) { ... } | for each element do something |
shift | get the first element and remove it |
pop | get the last element and remove it |
in | is an element in the list |
join | join a list of strings in a string using a glue string |
concat | list concatenation |
[ a, b, c ] | list constructor |
Array(a, b, c) (69) | list constructor |
length | list size |
a[i] | list/array indexing |
reverse | reverse |
sort | sort |
Missing:
adding an element at index
h[k] | dictionary (access: read/write) |
h.k | dictionary (access: read/write) |
{ a: b, c: d } | dictionary (constructor) |
delete | dictionary (remove by key) |
null | optional value (null value) |
v | optional value (value) |
. | record selector |
r["field"] | record selector |
Missing:
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (empty tuple)
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (1-uple)
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (using a tuple for a function call)
reference (pointer) (creation)
reference (pointer) (dereference)
dictionary (has the key ?)
dictionary (list of keys)
dictionary (list of values)
range
& / | / ^ | bitwise operators (and / or / xor) |
<< / >> / >>> | bitwise operators (left shift / right shift / unsigned right shift) |
~ | bitwise operators (negation) |
pow | exponentiation (power) |
log / | logarithm |
% | modulo (modulo of -3 / 2 is -1) |
- | negation |
1000., 1E3 | numbers syntax (decimals) |
07, 0xf | numbers syntax (integers in base 2, octal and hexadecimal) |
1000 | numbers syntax (integers) |
sqrt / exp / abs | square root / e-exponential / absolute value |
sin / cos / tan | trigonometry (basic) |
asin / acos / atan (88) | trigonometry (inverse) |
int / round / floor / ceil | truncate / round / floor / ceil |
Missing:
addition / subtraction / multiplication / division
random (random number)
random (seed the pseudo random generator)
operator priorities and associativities