JavaScript Ternary Operators
The ternary operator has three operands. It is the simplified operator of if/else.
Name |
Description |
Syntax |
Example |
It is like the short form of the if-else condition. |
Y = ? A : B If the condition is true then Y = A otherwise Y = B |
JavaScript Operators
JavaScript operators are symbols used to perform specific mathematical, comparison, assignment, and logical computations on operands. They are fundamental elements in JavaScript programming, allowing developers to manipulate data and control program flow efficiently. Understanding the different types of operators and how they work is important for writing effective and optimized JavaScript code.
JavaScript Operators: There are various operators supported by JavaScript.
Table of Content
- JavaScript Arithmetic Operators
- JavaScript Assignment Operators
- JavaScript Comparison Operators
- JavaScript Logical Operators
- JavaScript Bitwise Operators
- JavaScript Ternary Operators
- JavaScript Comma Operators
- JavaScript Unary Operators
- JavaScript Relational Operators
- JavaScript BigInt Operators
- JavaScript String Operators