Study Smart, Not Hard. - StudyMuch

# JavaScript Operators JavaScript Operators

In this tutorial you will learn about the JavaScript Operators, types of operators and how to use this in JavaScript with programming examples. Here given you many programming examples for your better revision about Operators. Now start to learn Operators.

What are Operators?

An Operators is a symbol that are used to perform particular operations, that takes one or more arguments and operates on them to product a result. They can be used to assign the values, combine values, compare values, perform arithmetic and more.

There are different types of Operators are used in JavaScript, that are given below;

• Assignment Operators
• Arithmetic Operators
• String Operators
• Comparison Operators

Now, you learn one by one all the given Operators in detail, with programming examples for your better understanding.

Assignment Operators

The Assignment Operator is an Operator that are used to assign the value to a variable, it uses the Equal = symbol. Look below some programming.

Examples of Assignment Operator;

 ```   JS Operator   ```

Above example we add the two number with using the help of + operator and assign the result.

The addition assignment operator adds the value of the right operand to the value of the variable. Given below the example.

Examples of Assignment Operator (+=);

 ```   JS Operator   ```

Output; Above you see the programming and output of assignment operator, where we saw how to assign the value.

Arithmetic Operator

The Arithmetic Operator are used to perform arithmetic operations like (addition, subtraction, multiplication, and division) between the values (operands).

Here are the symbols used for the Arithmetic Operator to obtained the result.

• Subtraction –
• Multiplication *
• Division /

Now, we see the programming examples of Arithmetic Operator, using all the symbols given.

Examples of Arithmetic Operator (Addition & Subtraction);

 ```   JS Operator
```

Output; Above you can see the programming example, where we add and subtract between two number with using “Subtract –” and “Addition +” Operators.

Examples of Arithmetic Operator (Multiplication & Division);

 ```     JS Operator
```

Output; You can see above programming and output of Arithmetic operator (Multiplication and Division), where the operation is done with multiply and divide operator between two operands.

Comparison Operators

The Comparison Operator compare its operands and return a Boolean based on whether the comparison is True or False. Given below the example where we compare with Comparison Operator the equality of two number.

Example of Comparison Operator;

 ```   JS Operator
```

Output; Above you can see the programming example and also output of program, where we compare two numbers using the Comparison Operator, and we saw the result is in True or False (Boolean).

String Operators

The String Operator are used to attach or add the two strings value, the addition operator + and the addition assignment += are the string operator. Given below some examples of String operators where we concatenate two or three string values.

Programming Examples of String Operator;

 ```   JS Operator
```

Output; Above you can see programming example an output of String Operator, where use + and += operator to concatenate two string values.

Example of String Operator, here we concatenate three string value with the help of String operator.

 ``` JS Operator   ```

Output; You can see above programming example with output, where we attach the three string values in a Sentence with the help of addition operator.

So, in this tutorial you learned all the JavaScript Operators with definition and programming examples of all the operators given in tutorial. I hope you read this tutorial (chapter) better and learn something new about the JavaScript Operators.

Categories: JavaScript #### Phyliss Habig · September 23, 2022 at 8:45 am

I like this website because so much useful stuff on here : D. #### marizon ilogert · October 6, 2022 at 11:49 am

I enjoy what you guys are up too. This type of clever work and exposure! Keep up the superb works guys I’ve included you guys to my blogroll. #### marizon ilogert · October 10, 2022 at 5:44 am

Thanks , I have recently been looking for information approximately this topic for a while and yours is the greatest I have discovered till now. However, what in regards to the bottom line? Are you sure concerning the supply? #### Cinderella Odham · January 16, 2023 at 9:12 am

I have recently started a site, the information you offer on this website has helped me tremendously. Thank you for all of your time & work.