Monday, November 9
Trending
- Diwali Online Shopping Scams 2026: 10 Ways to Stay Safe
- 10 Best DDoS Protection Services for 2027
- 12 Best Web Application Firewalls (WAF) for 2027
- Best Ethical Hacking Tools in 2027: Free & Paid Picks
- Software supply chain attacks 2026: Timeline and developer checklist
- Binance Hack: $6.3 Billion Drained in the Largest Crypto Theft Ever. What We Know So Far
- This Site Uses XSLT Chrome Warning Explained: How to Fix It
- iPad mini OLED Price in India: Wi-Fi & Cellular Variants, Offers
Arithmetic operators are symbols that represent computations like addition, multiplication, and division. JavaScript supports several arithmetic operators, including:
+(Addition)-(Subtraction)*(Multiplication)/(Division)%(Modulus)++(Increment)--(Decrement)
How to Use Arithmetic Operators
Here’s a brief explanation of how each operator works:
Addition (+)
The + operator adds two numbers together.
let sum = 5 + 3; // sum will be 8
Subtraction (-)
The - operator subtracts one number from another.
let difference = 5 - 3; // difference will be 2
Multiplication (*)
The * operator multiplies two numbers together.
let product = 5 * 3; // product will be 15
Division (/)
The / operator divides one number by another.
let quotient = 6 / 3; // quotient will be 2
Modulus (%)
The % operator returns the remainder of a division operation.
let remainder = 7 % 3; // remainder will be 1
Increment (++)
The ++ operator increases a number by 1.
let num = 5;
num++; // num will be 6
Decrement (--)
The -- operator decreases a number by 1.
let num = 5;
num--; // num will be 4
JavaScript’s arithmetic operators are fundamental to performing mathematical operations in your code. They are essential tools in every developer’s toolkit.



