JAVASCRIPT MASTER CLASS /// LEARN OPERATORS /// BUILD LOGIC /// ES6 /// JAVASCRIPT MASTER CLASS /// LEARN OPERATORS /// BUILD LOGIC /// ES6 /// JAVASCRIPT MASTER CLASS /// LEARN OPERATORS /// BUILD LOGIC /// ES6 ///

JavaScript
Operators

Learn how to manipulate data, compare values, and execute logical operations like a true Software Engineer.

operators.js
1 / 13
123456
🧮

Tutor:JavaScript operators are symbols that are used to perform operations on operands. Let's start with basic Arithmetic operators, like addition (+) and subtraction (-).


Skill Matrix

UNLOCK NODES BY LEARNING NEW OPERATORS.

Concept: Math

Perform math with operators. + - * / % are your basic tools.

System Check

Which operator gives you the remainder of a division?


Community Holo-Net

Showcase Your Logic

ACTIVE

Built a complex algorithm? Share your Javascript operator tricks with the class.

JavaScript Operators

Author

Pascual Vila

Frontend Instructor // Code Syllabus

In JavaScript, operators are special symbols that perform calculations, assignments, or comparisons on operands (variables and values). Understanding them is crucial for writing any logic.

Arithmetic Operators

Used to perform mathematical calculations. Standard math rules (PEMDAS) apply. The basic ones are +, -, *, and /. A very useful addition is the Modulo % which returns the remainder of a division.

Assignment Operators

Used to assign values to variables. The most basic is =. You can combine math and assignment with shorthand operators like += or *=.
Note: The single = is ONLY for assignment, never for comparison!

Comparison & Logical Operators

Comparison operators evaluate to a boolean (true or false). Always prefer Strict Equality === over loose equality ==, because strict checks both value and type, avoiding weird JS type coercion bugs.

Logical operators like AND &&, OR ||, and NOT ! allow you to chain multiple conditions together to build complex if-statements.

Advanced: The Ternary Operator+

The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy. This operator is frequently used as an alternative to an if...else statement.

Operators Glossary

Arithmetic

Operators like +, -, *, /, % used to perform math.

snippet.js

Strict Equality (===)

Returns true if BOTH operands are equal and of the same type.

snippet.js

Loose Equality (==)

Returns true if operands are equal, but converts types first. Avoid using this.

snippet.js

Logical AND (&&)

Returns true only if both the left AND right conditions are true.

snippet.js

Logical OR (||)

Returns true if AT LEAST ONE of the conditions is true.

snippet.js

Ternary Operator (?)

A one-line shorthand for an if/else statement.

snippet.js