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

What's hot (19)

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

Similar to Java script operators (20)

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

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

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
baabtra.com - No. 1 supplier of quality freshers
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
baabtra.com - No. 1 supplier of quality freshers
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
baabtra.com - No. 1 supplier of quality freshers
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
baabtra.com - No. 1 supplier of quality freshers
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
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
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
baabtra.com - No. 1 supplier of quality freshers
 
Blue brain
Blue brainBlue brain
Blue brain
baabtra.com - No. 1 supplier of quality freshers
 
5g
5g5g
5g
baabtra.com - No. 1 supplier of quality freshers
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
baabtra.com - No. 1 supplier of quality freshers
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
baabtra.com - No. 1 supplier of quality freshers
 
Ad

Recently uploaded (20)

THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18
Celine George
 
Introduction to Generative AI and Copilot.pdf
Introduction to Generative AI and Copilot.pdfIntroduction to Generative AI and Copilot.pdf
Introduction to Generative AI and Copilot.pdf
TechSoup
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
How to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POSHow to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POS
Celine George
 
Allomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdfAllomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdf
Abha Pandey
 
Vikas Bansal Himachal Pradesh: A Visionary Transforming Himachal’s Educationa...
Vikas Bansal Himachal Pradesh: A Visionary Transforming Himachal’s Educationa...Vikas Bansal Himachal Pradesh: A Visionary Transforming Himachal’s Educationa...
Vikas Bansal Himachal Pradesh: A Visionary Transforming Himachal’s Educationa...
Himalayan Group of Professional Institutions (HGPI)
 
Revista digital preescolar en transformación
Revista digital preescolar en transformaciónRevista digital preescolar en transformación
Revista digital preescolar en transformación
guerragallardo26
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptxWhat is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
GEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdfGEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdf
SHERAZ AHMAD LONE
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
How to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 EmployeeHow to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 Employee
Celine George
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptxSPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdfFEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
Overview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 EmployeesOverview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 Employees
Celine George
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdfBlack and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18How to Manage Upselling of Subscriptions in Odoo 18
How to Manage Upselling of Subscriptions in Odoo 18
Celine George
 
Introduction to Generative AI and Copilot.pdf
Introduction to Generative AI and Copilot.pdfIntroduction to Generative AI and Copilot.pdf
Introduction to Generative AI and Copilot.pdf
TechSoup
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 SlidesHow to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
How to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POSHow to Manage Inventory Movement in Odoo 18 POS
How to Manage Inventory Movement in Odoo 18 POS
Celine George
 
Allomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdfAllomorps and word formation.pptx - Google Slides.pdf
Allomorps and word formation.pptx - Google Slides.pdf
Abha Pandey
 
Revista digital preescolar en transformación
Revista digital preescolar en transformaciónRevista digital preescolar en transformación
Revista digital preescolar en transformación
guerragallardo26
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptxWhat is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
GEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdfGEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdf
SHERAZ AHMAD LONE
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
How to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 EmployeeHow to Manage & Create a New Department in Odoo 18 Employee
How to Manage & Create a New Department in Odoo 18 Employee
Celine George
 
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptxSPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
SPENT QUIZ NQL JR FEST 5.0 BY SOURAV.pptx
Sourav Kr Podder
 
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 1 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
Nice Dream.pdf /
Nice Dream.pdf                              /Nice Dream.pdf                              /
Nice Dream.pdf /
ErinUsher3
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdfFEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
Overview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 EmployeesOverview of Off Boarding in Odoo 18 Employees
Overview of Off Boarding in Odoo 18 Employees
Celine George
 
Black and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdfBlack and White Illustrative Group Project Presentation.pdf (1).pdf
Black and White Illustrative Group Project Presentation.pdf (1).pdf
AnnasofiaUrsini
 

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]