1 if $a is greater than or equal to $b 0 otherwise
$a == $b
1 if $a is equal to $b 0 otherwise
Not equal to
$a != $b
1 if $a is not equal to $b 0 otherwise
1 if $a is 0, 0 otherwise
$a && $b
1 if $a and $b are both non-zero, 0 otherwise
$a || $b
1 if either $a or $b is non-zero, 0 otherwise
Flip bits 1 to 0 and 0 to 1 (i.e., ~10b == 01b)
$a & $b
composite of elements where bits in same position are 1. (i.e., 1b & 1b == 1b)
$a | $b
composite of elements where bits 1 in either of the two elements. (i.e., 100b | 001b == 101b)
$a ^ $b
composite of elements where bits in same position are opposite (i.e., 100b ^ 101b == 001b)
$a << 3
element shifted left by 3 and padded with zeros (i.e., 11b << 3d == 11000b)
$a >> 3
element shifted right by 3 and padded with zeros (i.e., 1010b >> 3d == 00011b)
$a = $b;
Assign value of $b to $a.
$a op= $b;
Equivalent of $a = $a op $b. op can be any of: * / % +- & | ^ << >>
$c @ $d
Concatenates strings $c and $d into a single string. Numeric literals/variables convert to strings.
$c NL $d
Same as catenation example with new-line between $c and $d
$c TAB $d
Same as catenation example with tab between $c and $d.
$c SPC $d
Same as catenation example with space between space between $c and $d.
String equal to
$c $= $d
1 if $c is equal to $d .
String not equal to
$c !$= $d
1 if $c not equal to $d.
x ? y : z
Substitute y if x equal to 1, else substitute z.
Sixth element of array $a
Select a console method or field
This definition of the onCollision() function is in the Item namespace.
String constant (normal)
This is a normal string
This is a tagged string. The value of a tagged string is sent only once to a client.
String constant (tagged)
from the server (across the network). Subsequently, only the 'tag' is sent. All clients will store the string at and index identified by the 'tag' and can look up the value instead of requiring it be send repeatedly.
Single line comment
// This is a comment
Used to comment out a single line of TS
/* This is a multi line comment */
Used to comment out multiple consecutive lines. /* opens the comment and */ closes it.