---
title: "Types of operators in JavaScript"  
description: "Types of operators in JavaScript"  
author: "Anonymous User"  
published: 2021-07-19  
updated: 2021-07-19  
canonical: https://www.mindstick.com/forum/156512/types-of-operators-in-javascript  
category: "javascript"  
tags: ["javascript"]  
reading_time: 1 minute  

---

# Types of operators in JavaScript

How many types of [operators](https://www.mindstick.com/articles/716/php-operators) are there in [JavaScript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript)?

## Replies

### Reply by Ethan Karla

JavaScript operators are symbols that are used to perform operations on operands. For example:

var sum=10+20;

Here, + is the arithmetic operator and = is the assignment operator.

There are following types of operators in JavaScript.

1. Arithmetic Operators
2. Comparison Operators
3. Logical Operators
4. Assignment Operators
5. Conditional Operators

## Arithmetic Operators

Arithmetic operators are used to perform mathematical operations between numeric operands.\

## Comparison Operators

JavaScript language includes operators that compare two operands and return Boolean value true or false.

## Logical Operators

Logical operators are used to combine two or more conditions. JavaScript includes following logical operators.

## Assignment Operators

JavaScript includes assignment operators to assign values to variables with less key strokes.

## Ternary Operator

JavaScript includes special operator called ternary operator :? that assigns a value to a variable based on some condition. This is like short form of if-else condition.

\


---

Original Source: https://www.mindstick.com/forum/156512/types-of-operators-in-javascript

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
