SlideShare a Scribd company logo
Java script operators
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
JavaScript Operators
Nabeel.C
nabilmohad@gmail.com
www.facebook/ nabilmohad
twitter.com/shafikarassry
in.linkedin.com/in/nabilmohad
+919746477551
What is an operator?
Simple answer can be given using expression 4
+ 5 is equal to 9. Here 4 and 5 are called
operands and + is called operator.
JavaScript language supports following type of
operators.
• Arithmetic Operators
• Comparision Operators
• Logical (or Relational) Operators
• Assignment Operators
• Conditional (or ternary) Operators
The Arithmatic Operators:
Operator Description
+ Adds two operands
- Subtracts second operand from the first
* Multiply both operands
/ Divide numerator by denumerator
% Modulus Operator and remainder of after an integer division
++ Increment operator, increases integer value by one
-- Decrement operator, decreases integer value by one
• Addition operator (+) works for Numeric as
well as Strings. e.g. "a" + 10 will give "a10"
The Comparison Operators:
Operator Description
== Checks if the value of two operands are equal or
not, if yes then condition becomes true.
!= Checks if the value of two operands are equal or
not, if values are not equal then condition becomes
true.
> Checks if the value of left operand is greater than
the value of right operand, if yes then condition
becomes true.
< Checks if the value of left operand is less than the
value of right operand, if yes then condition
becomes true.
>= Checks if the value of left operand is greater than
or equal to the value of right operand, if yes then
condition becomes true.
<= Checks if the value of left operand is less than or
The Logical Operators:
Operator Description
&& Called Logical AND operator. If
both the operands are non zero
then then condition becomes true.
|| Called Logical OR Operator. If any
of the two operands are non zero
then then condition becomes true.
! Called Logical NOT Operator. Use
to reverses the logical state of its
operand. If a condition is true then
Logical NOT operator will make
false.
The Bitwise Operators:
Operator Description
& Called Bitwise AND operator. It performs a Boolean AND operation on each bit of its integer
arguments.
| Called Bitwise OR Operator. It performs a Boolean OR operation on each bit of its integer
arguments.
^ Called Bitwise XOR Operator. It performs a Boolean exclusive OR operation on each bit of its
integer arguments. Exclusive OR means that either operand one is true or operand two is
true, but not both.
~ Called Bitwise NOT Operator. It is a is a unary operator and operates by reversing all bits in
the operand.
<< Called Bitwise Shift Left Operator. It moves all bits in its first operand to the left by the
number of places specified in the second operand. New bits are filled with zeros. Shifting a
value left by one position is equivalent to multiplying by 2, shifting two positions is equivalent
to multiplying by 4, etc.
>> Called Bitwise Shift Right with Sign Operator. It moves all bits in its first operand to the right
by the number of places specified in the second operand. The bits filled in on the left depend
on the sign bit of the original operand, in order to preserve the sign of the result. If the first
operand is positive, the result has zeros placed in the high bits; if the first operand is
negative, the result has ones placed in the high bits. Shifting a value right one place is
equivalent to dividing by 2 (discarding the remainder), shifting right two places is equivalent
to integer division by 4, and so on.
>>> Called Bitwise Shift Right with Zero Operator. This operator is just like the >> operator,
except that the bits shifted in on the left are always zero,
The Assignment Operators:
Operator Description
= Simple assignment operator, Assigns values from
right side operands to left side operand
+= Add AND assignment operator, It adds right
operand to the left operand and assign the result to
left operand
-= Subtract AND assignment operator, It subtracts
right operand from the left operand and assign the
result to left operand
*= Multiply AND assignment operator, It multiplies
right operand with the left operand and assign the
result to left operand
/= Divide AND assignment operator, It divides left
operand with the right operand and assign the
result to left operand
%= Modulus AND assignment operator, It takes
modulus using two operands and assign the result
to left operand
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

More Related Content

PDF
itft-Operators in java
Atul Sehdev
 
PPTX
OCA JAVA - 3 Programming with Java Operators
Fernando Gil
 
PPTX
Operators in java presentation
kunal kishore
 
PDF
Operators in python
eShikshak
 
PPT
Operators
Devi Pradeep Podugu
 
PPTX
Python operators
nuripatidar
 
PPT
Java 2
Preethi Nambiar
 
PPTX
05 operators
dhrubo kayal
 
itft-Operators in java
Atul Sehdev
 
OCA JAVA - 3 Programming with Java Operators
Fernando Gil
 
Operators in java presentation
kunal kishore
 
Operators in python
eShikshak
 
Python operators
nuripatidar
 
05 operators
dhrubo kayal
 

What's hot (19)

PPTX
Operators in java
yugandhar vadlamudi
 
PPTX
Relational operators
Graphic Era Hill University,Bhimtal
 
PPTX
Operator 04 (js)
AbhishekMondal42
 
PDF
Java basic operators
Emmanuel Alimpolos
 
PDF
Operators in java
Muthukumaran Subramanian
 
PPT
CBSE Class XI :- Operators in C++
Pranav Ghildiyal
 
PPTX
Operators in Python
Anusuya123
 
PDF
R operators
Learnbay Datascience
 
PPTX
Python operators
SaurabhUpadhyay73
 
PPTX
Operators in c++
ABHIJITPATRA23
 
ODP
Operators
jayesh30sikchi
 
PPTX
Python Operators
Adheetha O. V
 
PPTX
Operator.ppt
Darshan Patel
 
PPTX
Operators in C & C++ Language
PreSolutions Softwares
 
PPTX
Oop using JAVA
umardanjumamaiwada
 
PPTX
Java script session 4
Saif Ullah Dar
 
PDF
Python : basic operators
S.M. Salaquzzaman
 
PPTX
Operators in python
deepalishinkar1
 
Operators in java
yugandhar vadlamudi
 
Operator 04 (js)
AbhishekMondal42
 
Java basic operators
Emmanuel Alimpolos
 
Operators in java
Muthukumaran Subramanian
 
CBSE Class XI :- Operators in C++
Pranav Ghildiyal
 
Operators in Python
Anusuya123
 
Python operators
SaurabhUpadhyay73
 
Operators in c++
ABHIJITPATRA23
 
Operators
jayesh30sikchi
 
Python Operators
Adheetha O. V
 
Operator.ppt
Darshan Patel
 
Operators in C & C++ Language
PreSolutions Softwares
 
Oop using JAVA
umardanjumamaiwada
 
Java script session 4
Saif Ullah Dar
 
Python : basic operators
S.M. Salaquzzaman
 
Operators in python
deepalishinkar1
 
Ad

Similar to Java script operators (20)

PPT
4_A1208223655_21789_2_2018_04. Operators.ppt
RithwikRanjan
 
PPTX
Operators used in vb.net
Jaya Kumari
 
PPTX
Operators and it's type
Asheesh kushwaha
 
PPTX
Operators in C/C++
Shobi P P
 
PPTX
Data Types and Operators in Python2.pptx
priyakanthr
 
PDF
c# operators
Micheal Ogundero
 
PPTX
Opeartor &amp; expression
V.V.Vanniapermal College for Women
 
PDF
04. Ruby Operators Slides - Ruby Core Teaching
quanhoangd129
 
PPT
operators and expressions in c++
sanya6900
 
PPTX
Operators and Expressions
Munazza-Mah-Jabeen
 
PDF
Java basic operators
Emmanuel Alimpolos
 
PPTX
Python_Module_3_AFkkkkV_Operators-1.pptx
tissot723
 
PDF
Types of Operators in C
Thesis Scientist Private Limited
 
PDF
C++ notes.pdf BASIC C++ NOTES FOR BEGGINERS
AAFREEN SHAIKH
 
PPTX
Python Lec-6 Operatorguijjjjuugggggs.pptx
ks812227
 
PPTX
Module2.2_Operators-in-C-Programming.pptx
MaheshKini3
 
PPTX
C Operators
Yash Modi
 
PPTX
dizital pods session 3.pptx
VijayKumarLokanadam
 
PPT
python operators.ppt
ErnieAcuna
 
PPTX
Operators in Python Arithmetic Operators
ramireddyobulakondar
 
4_A1208223655_21789_2_2018_04. Operators.ppt
RithwikRanjan
 
Operators used in vb.net
Jaya Kumari
 
Operators and it's type
Asheesh kushwaha
 
Operators in C/C++
Shobi P P
 
Data Types and Operators in Python2.pptx
priyakanthr
 
c# operators
Micheal Ogundero
 
Opeartor &amp; expression
V.V.Vanniapermal College for Women
 
04. Ruby Operators Slides - Ruby Core Teaching
quanhoangd129
 
operators and expressions in c++
sanya6900
 
Operators and Expressions
Munazza-Mah-Jabeen
 
Java basic operators
Emmanuel Alimpolos
 
Python_Module_3_AFkkkkV_Operators-1.pptx
tissot723
 
Types of Operators in C
Thesis Scientist Private Limited
 
C++ notes.pdf BASIC C++ NOTES FOR BEGGINERS
AAFREEN SHAIKH
 
Python Lec-6 Operatorguijjjjuugggggs.pptx
ks812227
 
Module2.2_Operators-in-C-Programming.pptx
MaheshKini3
 
C Operators
Yash Modi
 
dizital pods session 3.pptx
VijayKumarLokanadam
 
python operators.ppt
ErnieAcuna
 
Operators in Python Arithmetic Operators
ramireddyobulakondar
 
Ad

More from baabtra.com - No. 1 supplier of quality freshers (20)

PPTX
Agile methodology and scrum development
baabtra.com - No. 1 supplier of quality freshers
 
PDF
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
PDF
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
PDF
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Chapter 3 stored procedures
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Agile methodology and scrum development
baabtra.com - No. 1 supplier of quality freshers
 
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 

Recently uploaded (20)

PPTX
Week 4 Term 3 Study Techniques revisited.pptx
mansk2
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
PDF
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
PDF
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PDF
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
PDF
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
PPTX
Strengthening open access through collaboration: building connections with OP...
Jisc
 
PPTX
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
PDF
Landforms and landscapes data surprise preview
jpinnuck
 
PPTX
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
TumwineRobert
 
PPTX
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
PPTX
TEF & EA Bsc Nursing 5th sem.....BBBpptx
AneetaSharma15
 
PDF
Sunset Boulevard Student Revision Booklet
jpinnuck
 
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Mithil Fal Desai
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
Week 4 Term 3 Study Techniques revisited.pptx
mansk2
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
3.The-Rise-of-the-Marathas.pdfppt/pdf/8th class social science Exploring Soci...
Sandeep Swamy
 
Strengthening open access through collaboration: building connections with OP...
Jisc
 
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
Landforms and landscapes data surprise preview
jpinnuck
 
ACUTE NASOPHARYNGITIS. pptx
AneetaSharma15
 
Cardiovascular Pharmacology for pharmacy students.pptx
TumwineRobert
 
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
TEF & EA Bsc Nursing 5th sem.....BBBpptx
AneetaSharma15
 
Sunset Boulevard Student Revision Booklet
jpinnuck
 
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Mithil Fal Desai
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 

Java script operators

  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 4. What is an operator? Simple answer can be given using expression 4 + 5 is equal to 9. Here 4 and 5 are called operands and + is called operator. JavaScript language supports following type of operators.
  • 5. • Arithmetic Operators • Comparision Operators • Logical (or Relational) Operators • Assignment Operators • Conditional (or ternary) Operators
  • 6. The Arithmatic Operators: Operator Description + Adds two operands - Subtracts second operand from the first * Multiply both operands / Divide numerator by denumerator % Modulus Operator and remainder of after an integer division ++ Increment operator, increases integer value by one -- Decrement operator, decreases integer value by one
  • 7. • Addition operator (+) works for Numeric as well as Strings. e.g. "a" + 10 will give "a10"
  • 8. The Comparison Operators: Operator Description == Checks if the value of two operands are equal or not, if yes then condition becomes true. != Checks if the value of two operands are equal or not, if values are not equal then condition becomes true. > Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true. < Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true. >= Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true. <= Checks if the value of left operand is less than or
  • 9. The Logical Operators: Operator Description && Called Logical AND operator. If both the operands are non zero then then condition becomes true. || Called Logical OR Operator. If any of the two operands are non zero then then condition becomes true. ! Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false.
  • 10. The Bitwise Operators: Operator Description & Called Bitwise AND operator. It performs a Boolean AND operation on each bit of its integer arguments. | Called Bitwise OR Operator. It performs a Boolean OR operation on each bit of its integer arguments. ^ Called Bitwise XOR Operator. It performs a Boolean exclusive OR operation on each bit of its integer arguments. Exclusive OR means that either operand one is true or operand two is true, but not both. ~ Called Bitwise NOT Operator. It is a is a unary operator and operates by reversing all bits in the operand. << Called Bitwise Shift Left Operator. It moves all bits in its first operand to the left by the number of places specified in the second operand. New bits are filled with zeros. Shifting a value left by one position is equivalent to multiplying by 2, shifting two positions is equivalent to multiplying by 4, etc. >> Called Bitwise Shift Right with Sign Operator. It moves all bits in its first operand to the right by the number of places specified in the second operand. The bits filled in on the left depend on the sign bit of the original operand, in order to preserve the sign of the result. If the first operand is positive, the result has zeros placed in the high bits; if the first operand is negative, the result has ones placed in the high bits. Shifting a value right one place is equivalent to dividing by 2 (discarding the remainder), shifting right two places is equivalent to integer division by 4, and so on. >>> Called Bitwise Shift Right with Zero Operator. This operator is just like the >> operator, except that the bits shifted in on the left are always zero,
  • 11. The Assignment Operators: Operator Description = Simple assignment operator, Assigns values from right side operands to left side operand += Add AND assignment operator, It adds right operand to the left operand and assign the result to left operand -= Subtract AND assignment operator, It subtracts right operand from the left operand and assign the result to left operand *= Multiply AND assignment operator, It multiplies right operand with the left operand and assign the result to left operand /= Divide AND assignment operator, It divides left operand with the right operand and assign the result to left operand %= Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand
  • 12. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: [email protected]