String
Integer or float
null value
64 bit float (number with decimal point)
64 bit signed integer
Boolean value (either true or false)
Addition
Unary positive, makes number positive
Subtraction
Unary negative, makes number negative
Multiplication
Division
Modulo (remainder of division)
Indice
Increment
Decrement
Equals
a+=b is a=a+b
a-=b is a=a-b
a*=b is a=a*b
a/=b is a=a/b
a%=b is a=a%b
a**=b is a=a**b
a&=b is a=a&b
a|=b is a=a|b
a^=b is a=a^b
a>>>=b is a=a>>>b
a><<=b is a=a><<b
Is equal to
Has equal value and type to
Is not equal to
Doesn't have equal value or type to
Greater than
Less than
Greater than or equal to
Less than or equal to
Ternary operator; executes one of two possibilities based on boolean value
Bitwise AND
Bitwise OR
Bitwise XOR
Arithmetic shift left (shifts all the bits one space to the left, essentially multiplying it by 2)
Logical shift right (shifts all the bits one space to the right, essentially dividing it by 2)
Unsigned logical shift right (shifts all the bits one space to the right, essentially dividing it by 2)
Bitwise NOT
AND operator
OR operator
NOT operator
Returns the type of a variable
Returns true if an object is an instance of an object type
Applies method to object
Applies a state to an enum type
Initialises an array
References an array's index
Used to separate parameters
Defines a list
Denotes parameters of a function
Defines a block
Used for switch cases
Used in declaring a class instance's variable's value
Defines a lambda expression
Declares a string
Declares a string
Declares end of a line of code
Used to declare constant that can't be redeclared throughout entire code
Used to declare a variable
Used to declare an object that can't be redeclared within current block
Used for including a class in another class, creating polymorphism
Used for referencing the class' superclass
Used for cases in a switch
Used for delcaring states in an enum
Used for including an interface in another interface or in a class, creating polymorphism
Used for defining an enum; a datatype that denotes a "state" of something
Used for declaring an interface; like a class but has no variables and methods can be empty
Used for declaring an abstract class or method, which is a class or method that is only accessible through its subclasses and is defined in its subclass
Used for declaring switch statements
Used for declaring doubles (also known as floats, or numbers with decimal place)
Used for declaring booleans
Used for declaring integers
Used for declaring strings
Used for declaring methods that do not depend on the state of the class
Used for declaring loop in a while loop
Used for throwing error messages
Used for denoting methods that throw specific errors
Used for declaring characters
Used for declaring that a method does not return a specific value
Used for referring to the original constructor of a class on which a new object is being created
Used for declaring new objects from a class
Used for declaring private classes or methods, that cannot be interacted with by other classes
Used for declaring public classes or methods, that can be interacted with by other classes
Used for declaring if statements
Used for declaring while loops
Used for declaring for loops
Used for declaring try catch
Used for declaring exception case
Used for declaring else statements
Used for importing foreign classes for use in code
Used to give a final value at the end of a function or method
Used to tell compiler to end the loop
Used to denote a class with no subclasses or a function that can't be overwritten in a subclass
Executes code on failed try statement
catch (Exception exception)
code
Declares a class (class name must have a capital letter at start)
Loops code for a set amount iterations or for every object in list
for (initialization; condition; update) {
code;
}
for (let variable in array) {
code;
}
Executes code on true condition
if (condition) {
code;
}
Includes foreign file's functions
Executes when an if statement is false or if a try statement has no error
else {
code;
}
Displays different outcomes based on the value within the expression
switch (expression) {
case x:
code;
break;
case y:
code;
break;
}
Attempts to execute code and ignores on error
try {
code;
}
try (declaration) {
code;
}
Executes code at end of try statement
finally {
code;
}
Declares an enum
enum enum {
code;
}
Declares a function
function function(args) {
code;
}
var function =function(args) {
code;
}
Declares a promise (basically an asynchronous try-catch, or then-catch in javascript terms)
new Promise((resolve, reject) => { //code showing conditional paths for both resolve() and reject() });
var function =function(args) {
code;
}
Represents actions to take when a promise is fufilled
Loops code on true condition
while (condition) {
//code to loop
}
do {
//code when true
}
while (condition);
Creates boolean prompt that displays a string, returns the answer the user selects
Creates string prompt that displays a string, returns the answer the user wrote
Creates an alert popup that displays a string
Returns length of a string
Used to tell compiler the rest of this line is not to be compiled
Opens a multi line comment
Closes a multi line comment
Constructor of a class (method to make objects of a class)
Encoding that uses alpha-numeric encoding as well as + and /. It uses = as padding to ensure every string has a length that is a multiple of 4
Encoding that contains numbers 0 to 9 as well as letters A, B, C, D, E, and F, that maps ASCII characters to their hex representation
Encoding that translates each letter to the letter 13 letters in front, a form of caeser cypher