TypeScript Arithmetic operators
In TypeScript, arithmetic operators are used to perform mathematical calculations.
Name |
Description |
Syntax |
---|---|---|
Addition(+) |
Adds two values or expressions. | a + b |
Subtraction(-) |
Subtracts the right operand from the left operand. | a - b |
Multiplication(*) |
Multiplies two values or expressions | a * b |
Division(/) |
Divides the left operand by the right operand. | a / b |
Modulus(%) |
Returns the remainder of the division of the left operand by the right operand. | a % b |
Increment(++) |
Increase the value of the operand by 1. | a++ or ++a |
Decrement(--) |
Decrease the value of the operand by 1. | a-- or --a |
TypeScript Operators
TypeScript operators are symbols or keywords that perform operations on one or more operands. In this article, we are going to learn various types of TypeScript Operators.
Below are the different TypeScript Operators:
Table of Content
- TypeScript Arithmetic operators
- TypeScript Logical operators
- TypeScript Relational operators
- TypeScript Bitwise operators
- TypeScript Assignment operators
- TypeScript Ternary/conditional operator
- TypeScript Type Operators
- TypeScript String Operators