Welcome Guest! (App Version 3.1)

# Operators

## Operators in JavaScript

These are entities which help on doing various kinds of arithmetical or logical operations on data contained in variables.

Following are the 4 kinds of operators:

• Arithmetic
• Logical
• Comparison
• Assignment
Arithmetic Operators
S.No.NameRepresentationDescriptionExamples
2Subtract-Selects an Element
3Multiply*Selects all elements having the defined attribute such as name, width, height, href, etc.
4Divide/Selects an Element
5Modulus%Selects all elements having the defined attribute such as name, width, height, href, etc.
6Increment++Selects all elements having the defined attribute such as name, width, height, href, etc.
7Decrement--Selects all elements having the defined attribute such as name, width, height, href, etc.
Logical Operators
S.No.NameRepresentationDescriptionExamples
1Logical And&&Selects everything
2Logical Or||Selects an Element
3Logical Not!Selects all elements having the defined attribute such as name, width, height, href, etc.
Comparison Operators
S.No.NameRepresentationDescriptionExamples
1Equals==Selects everything
2Exactly equals===Selects an Element
3Does not equal!=Selects all elements having the defined attribute such as name, width, height, href, etc.
4Does not exactly equal!==Selects an Element
5Less than<Selects all elements having the defined attribute such as name, width, height, href, etc.
6Greater than>Selects all elements having the defined attribute such as name, width, height, href, etc.
7Ternary?Selects all elements having the defined attribute such as name, width, height, href, etc.
Assignment Operators
S.No.NameRepresentationDescriptionExamples
1Assign to=Assign to