JavaScript Arithmetic Operators

Luke ChidubemLuke Chidubem
1 min read

Arithmetic operators are used in JavaScript to perform arithmetic operations on values, such as addition, subtraction, multiplication, and division. Here are some examples:

1) Addition (+): This operator is used to add two or more values together. For example:

2) Subtraction (-): This operator is used to subtract one value from another. For example:

3) Multiplication (*): This operator is used to multiply two or more values together. For example:

4) Division (/): This operator is used to divide one value by another. For example:

5) Modulo (%): This operator is used to find the remainder of a division operation. For example:

6) Increment (++) and Decrement (--): These operators are used to increase or decrease the value of a variable by 1. For example:

These are some examples of arithmetic operators in JavaScript. There are also other operators such as exponentiation (**), which is used to raise a value to a power, and assignment operators (+=, -=, *=, /=, %=), which combine arithmetic operations with assignment.

That's it for JavaScript Arithmetic Operators. Thanks for learning ❤️

0
Subscribe to my newsletter

Read articles from Luke Chidubem directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Luke Chidubem
Luke Chidubem

I am a proactive Full-Stack Software Engineer with a background in Business and Maritime Management. I specialized in JavaScript, HTML, CSS, NodeJS, ExpressJS, ReactJS, NextJS, TypeScript and more. I possess strong skills in problem solving, communication, and collaboration that leads to quality products & results. I also love Meeting with the software development team to define the scope and scale of software projects thereby leading to the software architectural design. I am equally eager to expand my knowledge and implement what I have learnt in a practical and professional environment.