Skip to main content

Posts

Showing posts with the label Arithmetic - Assignment - Comparison - Logical - Unary - Conditional and Bitwise Operators - Types of operators in JavaScript

JavaScript Operators | Arithmetic - Assignment - Comparison - Logical - Unary - Conditional and Bitwise Operators - Types of operators in JavaScript

JavaScript Operators: JavaScript operators are symbols used to perform operations on variables and values. They allow you to manipulate data and perform calculations.  Here are the main types of operators in JavaScript: 1. Arithmetic Operators:    - `+` (Addition): Adds two operands.    - `-` (Subtraction): Subtracts the right operand from the left operand.    - `*` (Multiplication): Multiplies two operands.    - `/` (Division): Divides the left operand by the right operand.    - `%` (Modulus): Returns the remainder when the left operand is divided by the right operand.    - `` (Exponentiation): Raises the left operand to the power of the right operand.    javascript    let a = 5;    let b = 2;    let result = a + b; // result is 7 JavaScript Operators 2. Assignment Operators:    - `=` (Assignment): Assigns the value of the right operand to the left operand. ...