General

General javascript functions and syntax.

if(criteria)
Evaluates a bool criteria such as a variable or statement and executes code if true.
el­se
For use in if statements, runs code statement or block if criteria evaluates to "false".
func­tio­n(name, params)
Keyword that declares a function.
re­tur­n(value)
Used in function statements and API function files.
brea­k
Terminates the current for, while, or do-while loop and continues executing the code that follows the loop.
con­tinue
Jumps to next item and continues in the current for loop.
ty­peo­f(value)
The typeof operator returns a string describing the type of the value.
switc­h(value)
A JavaScript switch statement is a control flow construct that allows code to be executed conditionally based on the match between a provided expression's value and specific case values, often used as a more readable alternative to a series of if-else statements.
im­por­t(filename)
The `import` keyword in JavaScript is used to import functions, objects, or variables from another file, which can then be used in the current file.
try(statements, catch, finally)
The JavaScript try statement executes a block of code, catches errors if they occur using catch, and includes an optional finally block that executes regardless of the outcome.