Welcome Guest! (App Version 3.1)

websitnero logo name

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
1Add+Selects everything
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
2Add to itself+=Add to itself
3Subtract to itself-=Selects all elements having the defined attribute such as name, width, height, href, etc.
4Multiply to itself*=Selects an Element
5Divide to itself/=Selects all elements having the defined attribute such as name, width, height, href, etc.
6Modulus to itself%=Selects all elements having the defined attribute such as name, width, height, href, etc.
WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.