JavaScript Operators

What is operator?

Operator is symbol which is for mathematical operation and logical manipulation.

Syntax

left-operand operator right-operand

example:
5 + 9


Arithmetic Operators

Arithmetic operators used for numeric values.

+ is used for addition.
- is used for Subtraction.
* is used for Multiplication.
/ is used for division.
% is used for Modulus (Remainder)

Try in editor

+ operator in JavaScript

+ operator is used to concatenate string value in javascript.

+ operator is used to sum numbers in javascript.

Try in editor

JavaScript Assignment Operators

= is used to assign a value into a variable.
Example var m = 100;
+= is used to add two value and assign into variable.
Example a += 100;
It means a = a + 100;

-= is used to subtract two value and assign into variable.
Example a -= 100;
It means a = a - 100;
*= is used to multiply two value and assign into variable.
Example a *= 100; It means a = a * 100;

/= is used to divide two value and assign into variable.
Example a /= 100;
It means a = a / 100;
%= is used to get remainder and assign into variable.
Example a %= 100;
It means a = a % 100;

Try in editor

About Us

Comsysapp.com is an educational website. Students and software developers can learn programming language tutorials. Comsysapp is very useful for beginners and professional developers. Comsysapp provides tutorial in easy language. Comsysapp.com has focus on simplicity.

Services

Comsysapp.com provides free tutorials like c, html, css, etc. All tutorials are free for beginner and professionals.


Terms of Use

comsysapp.com is not responsible for any mistake. We are not responsible if information made available on our website is incomplete or invalid. But comsysapp.com always try for zero-zero mistake.

Privacy policy

comsysapp.com does not collect any data from users. We use Google AdSense advertising on our website. We never ask personal or private information.


Sitemap

sitemap

copyright © 2023