- Tags: Math
- Categories: JavaScript Reference, JavaScript Resources, Reference
Quick Reference
This is a quick reference list of JavaScript operators with examples of how they are used.
JavaScript – Arithmetic Operators
JavaScript arithmetic operators are used to perform arithmetic between variables and/or values.
JavaScript – Assignment Operators
JavaScript assignment operators are used to assign values to variables.
JavaScript – Comparison Operators
JavaScript comparison operators are used in logical statements to determine equality or inequality between variables and/or values.
JavaScript – delete Operator
The delete operator deletes a property from an object. It deletes both the value of the property and the property itself.
JavaScript – in Operator
The in operator returns “true” if the specified property is in the specified object, or “false” if it is not.
JavaScript – Increment/Decrement Operators
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.
JavaScript – instanceof Operator
The instanceof operator returns true if the specified object is an instance of the specified object type.
JavaScript – Logical Operators
Logical operators are used to determine the logic between variables or values.
JavaScript – String Operators
In JavaScript, the + operator, and the += operator can be used to concatenate (bring together) multiple strings, or strings and variables.
JavaScript – Ternary Operator
The ternary (conditional) operator assigns a value to a variable based on a condition.
JavaScript – typeof Operator
The typeof operator returns the type of a variable, object, function, or expression.
JavaScript – void Operator
The void operator evaluates an expression and returns undefined, and is often used to obtain the undefined primitive value, using “void(0)”.
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.
Why 1SMARTchicken?
See More →
Thanks for your support!
JavaScript Books
All are affiliate links. Thank you for your support!
JAVASCRIPT NOTES:
- When using JavaScript, single or double quotation marks are acceptable and work identically to one another; choose whichever you prefer, and stay consistent
- JavaScript is a case-sensitive language; firstName is NOT the same as firstname
- Arrays count starting from zero NOT one; so item 1 is position [0], item 2 is position [1], and item 3 is position [2] … and so on
- JavaScript variables must begin with a letter, $, or _
- JavaScript variables are case sensitive (x is not the same as X)
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.