JavaScript – Arithmetic Operators
JavaScript arithmetic operators are used to perform arithmetic between variables and/or values.
JavaScript arithmetic operators are used to perform arithmetic between variables and/or values.
JavaScript assignment operators are used to assign values to variables.
JavaScript comparison operators are used in logical statements to determine equality or inequality between variables and/or values.
The delete operator deletes a property from an object. It deletes both the value of the property and the property itself.
The in operator returns “true” if the specified property is in the specified object, or “false” if it is not.
JavaScript increment/decrement operators are used to increase or decrease a variable and/or value, and is often used in loops as a way to count iterations.
The instanceof operator returns true if the specified object is an instance of the specified object type.
Logical operators are used to determine the logic between variables or values.
In JavaScript, the + operator, and the += operator can be used to concatenate (bring together) multiple strings, or strings and variables.
The ternary (conditional) operator assigns a value to a variable based on a condition.
The typeof operator returns the type of a variable, object, function, or expression.
The void operator evaluates an expression and returns undefined, and is often used to obtain the undefined primitive value, using “void(0)”.
The break statement stops code execution within the switch, and also breaks out of a loop, continuing to execute code that comes after the loop.
The class statement initiates a class with properties and methods assigned in the constructor() method.
The const statement declares a variable (container for storing information) with an immediately defined value that will not change.
The continue statement breaks an iteration in the loop, if a specified condition occurs, and then continues with the next iteration in the loop.
The debugger statement stops the execution of a script and calls the debugger. If debugging is unavailable, the statement has no effect.
The do…while statement defines a code block to be executed at least once, and repeated as long as a condition is true.
The for statement defines a block of code to be executed as long as a specified condition is true.
The for…in statement loops over the properties of an object, executing a block of code inside the loop once for each item found.