SlideShare una empresa de Scribd logo
1 de 7
JavaScript Basics
Data Types
• Numbers
• Strings
• Boolean
• JS is a dynamically typed language
Operators
• Assignment operators = , +=
• Comparison operators == , != , < , >
• Arithmetic operators +, - , /, *
• Bitwise operators
• Logical operators
• String operators
• Special operators
Control Flow
if (condition)
statement_1
[else
statement_2]
Loop
for ([initialExpression]; [condition];
[incrementExpression])
statement
while (condition)
statement
Functions
A function definition (also called a function
declaration) consists of the function keyword,
followed by
• The name of the function.
• A list of arguments to the function, enclosed
in parentheses and separated by commas.
• The JavaScript statements that define the
function, enclosed in curly braces, { }.
function square(number) {
return number * number;
}

Más contenido relacionado

La actualidad más candente

La actualidad más candente (13)

Abstract classes
Abstract classesAbstract classes
Abstract classes
 
Type conversions
Type conversionsType conversions
Type conversions
 
function Creation in Mysql
function Creation in Mysqlfunction Creation in Mysql
function Creation in Mysql
 
Cs1123 4 variables_constants
Cs1123 4 variables_constantsCs1123 4 variables_constants
Cs1123 4 variables_constants
 
Rdbms chapter 1 function
Rdbms chapter 1 functionRdbms chapter 1 function
Rdbms chapter 1 function
 
structures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatypestructures in C and Union in C, enumerated datatype
structures in C and Union in C, enumerated datatype
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Knolx Session : Built-In Control Structures in Scala
Knolx Session : Built-In Control Structures in ScalaKnolx Session : Built-In Control Structures in Scala
Knolx Session : Built-In Control Structures in Scala
 
Ocl
OclOcl
Ocl
 
Knolx Session: Introducing Extractors in Scala
Knolx Session: Introducing Extractors in ScalaKnolx Session: Introducing Extractors in Scala
Knolx Session: Introducing Extractors in Scala
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
New features in java se 8
New features in java se 8New features in java se 8
New features in java se 8
 
phases of compiler
phases of compilerphases of compiler
phases of compiler
 

Destacado

Programming Without Coding Technology (PWCT) - Textbox Control
Programming Without Coding Technology (PWCT) - Textbox ControlProgramming Without Coding Technology (PWCT) - Textbox Control
Programming Without Coding Technology (PWCT) - Textbox ControlMahmoud Samir Fayed
 
Blockchain état des lieux et perspectives
Blockchain   état des lieux et perspectivesBlockchain   état des lieux et perspectives
Blockchain état des lieux et perspectivesGuillaume ANDRE
 
Burande ashish resume(how to make simple resume)
Burande ashish resume(how to make simple resume)Burande ashish resume(how to make simple resume)
Burande ashish resume(how to make simple resume)Ashish burande
 
Feature of an Ecommerce
Feature of an EcommerceFeature of an Ecommerce
Feature of an Ecommercelimrawebworld
 
Conceptos básicos de redes de computadores
Conceptos básicos de redes de computadores Conceptos básicos de redes de computadores
Conceptos básicos de redes de computadores Daniel Espinosa
 
PROGETTO WHP - PROMOZIONE SALUTE NEI CONTESTI OCCUPAZIONALI
PROGETTO WHP - PROMOZIONE SALUTE NEI CONTESTI OCCUPAZIONALIPROGETTO WHP - PROMOZIONE SALUTE NEI CONTESTI OCCUPAZIONALI
PROGETTO WHP - PROMOZIONE SALUTE NEI CONTESTI OCCUPAZIONALImartino massimiliano trapani
 
Cholesteatoma
Cholesteatoma Cholesteatoma
Cholesteatoma Razal M
 

Destacado (11)

Formas
FormasFormas
Formas
 
Supervision
SupervisionSupervision
Supervision
 
Programming Without Coding Technology (PWCT) - Textbox Control
Programming Without Coding Technology (PWCT) - Textbox ControlProgramming Without Coding Technology (PWCT) - Textbox Control
Programming Without Coding Technology (PWCT) - Textbox Control
 
Blockchain état des lieux et perspectives
Blockchain   état des lieux et perspectivesBlockchain   état des lieux et perspectives
Blockchain état des lieux et perspectives
 
Burande ashish resume(how to make simple resume)
Burande ashish resume(how to make simple resume)Burande ashish resume(how to make simple resume)
Burande ashish resume(how to make simple resume)
 
Feature of an Ecommerce
Feature of an EcommerceFeature of an Ecommerce
Feature of an Ecommerce
 
Conceptos básicos de redes de computadores
Conceptos básicos de redes de computadores Conceptos básicos de redes de computadores
Conceptos básicos de redes de computadores
 
Organizzazione mondiale sanita'
Organizzazione mondiale sanita'Organizzazione mondiale sanita'
Organizzazione mondiale sanita'
 
PROGETTO WHP - PROMOZIONE SALUTE NEI CONTESTI OCCUPAZIONALI
PROGETTO WHP - PROMOZIONE SALUTE NEI CONTESTI OCCUPAZIONALIPROGETTO WHP - PROMOZIONE SALUTE NEI CONTESTI OCCUPAZIONALI
PROGETTO WHP - PROMOZIONE SALUTE NEI CONTESTI OCCUPAZIONALI
 
Cholesteatoma CME
Cholesteatoma CMECholesteatoma CME
Cholesteatoma CME
 
Cholesteatoma
Cholesteatoma Cholesteatoma
Cholesteatoma
 

Similar a Road to code

GDSC Web Bootcamp - Day - 2 - JavaScript
GDSC Web Bootcamp -  Day - 2   - JavaScriptGDSC Web Bootcamp -  Day - 2   - JavaScript
GDSC Web Bootcamp - Day - 2 - JavaScriptSahithiGurlinka
 
Programming course slides c++ (Prof Mansoor Bhatti)
Programming course slides c++ (Prof Mansoor Bhatti)Programming course slides c++ (Prof Mansoor Bhatti)
Programming course slides c++ (Prof Mansoor Bhatti)Syed Arslan Rizvi
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1Toni Kolev
 
JavaScript operators
JavaScript operatorsJavaScript operators
JavaScript operatorsVivek Kumar
 
An Introduction on Functions in python 3.pdf
An Introduction on Functions in python 3.pdfAn Introduction on Functions in python 3.pdf
An Introduction on Functions in python 3.pdfalivaisi1
 
002. Introducere in type script
002. Introducere in type script002. Introducere in type script
002. Introducere in type scriptDmitrii Stoian
 
JavaScript Robotics
JavaScript RoboticsJavaScript Robotics
JavaScript RoboticsAnna Gerber
 
Programming with Python - Week 3
Programming with Python - Week 3Programming with Python - Week 3
Programming with Python - Week 3Ahmet Bulut
 
predefined and user defined functions
predefined and user defined functionspredefined and user defined functions
predefined and user defined functionsSwapnil Yadav
 
data-types-operators-datatypes-operators.ppt
data-types-operators-datatypes-operators.pptdata-types-operators-datatypes-operators.ppt
data-types-operators-datatypes-operators.pptGagan Rana
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basicsLovelitJose
 
CH.4FUNCTIONS IN C (1).pptx
CH.4FUNCTIONS IN C (1).pptxCH.4FUNCTIONS IN C (1).pptx
CH.4FUNCTIONS IN C (1).pptxsangeeta borde
 
Unraveling the mystery of monads
Unraveling the mystery of monadsUnraveling the mystery of monads
Unraveling the mystery of monadsFaisal Waris
 

Similar a Road to code (20)

Chap 3(operator expression)
Chap 3(operator expression)Chap 3(operator expression)
Chap 3(operator expression)
 
GDSC Web Bootcamp - Day - 2 - JavaScript
GDSC Web Bootcamp -  Day - 2   - JavaScriptGDSC Web Bootcamp -  Day - 2   - JavaScript
GDSC Web Bootcamp - Day - 2 - JavaScript
 
Programming course slides c++ (Prof Mansoor Bhatti)
Programming course slides c++ (Prof Mansoor Bhatti)Programming course slides c++ (Prof Mansoor Bhatti)
Programming course slides c++ (Prof Mansoor Bhatti)
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
 
JavaScript operators
JavaScript operatorsJavaScript operators
JavaScript operators
 
An Introduction on Functions in python 3.pdf
An Introduction on Functions in python 3.pdfAn Introduction on Functions in python 3.pdf
An Introduction on Functions in python 3.pdf
 
002. Introducere in type script
002. Introducere in type script002. Introducere in type script
002. Introducere in type script
 
JavaScript Robotics
JavaScript RoboticsJavaScript Robotics
JavaScript Robotics
 
3. functions modules_programs (1)
3. functions modules_programs (1)3. functions modules_programs (1)
3. functions modules_programs (1)
 
Programming with Python - Week 3
Programming with Python - Week 3Programming with Python - Week 3
Programming with Python - Week 3
 
Client sidescripting javascript
Client sidescripting javascriptClient sidescripting javascript
Client sidescripting javascript
 
predefined and user defined functions
predefined and user defined functionspredefined and user defined functions
predefined and user defined functions
 
Unit 7. Functions
Unit 7. FunctionsUnit 7. Functions
Unit 7. Functions
 
data-types-operators-datatypes-operators.ppt
data-types-operators-datatypes-operators.pptdata-types-operators-datatypes-operators.ppt
data-types-operators-datatypes-operators.ppt
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basics
 
Sql functions
Sql functionsSql functions
Sql functions
 
Functions
FunctionsFunctions
Functions
 
CH.4FUNCTIONS IN C (1).pptx
CH.4FUNCTIONS IN C (1).pptxCH.4FUNCTIONS IN C (1).pptx
CH.4FUNCTIONS IN C (1).pptx
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Unraveling the mystery of monads
Unraveling the mystery of monadsUnraveling the mystery of monads
Unraveling the mystery of monads
 

Más de Apoorvi Kapoor (20)

2slidedeck-150318164339-conversion-gate01
2slidedeck-150318164339-conversion-gate012slidedeck-150318164339-conversion-gate01
2slidedeck-150318164339-conversion-gate01
 
Hiking guide2014
Hiking guide2014Hiking guide2014
Hiking guide2014
 
Readme
ReadmeReadme
Readme
 
Empty
EmptyEmpty
Empty
 
111111
111111111111
111111
 
03 03 what_aboutbigdata
03 03 what_aboutbigdata03 03 what_aboutbigdata
03 03 what_aboutbigdata
 
Hiking guide2014
Hiking guide2014Hiking guide2014
Hiking guide2014
 
111111
111111111111
111111
 
Abcd feihfiewfn
Abcd feihfiewfnAbcd feihfiewfn
Abcd feihfiewfn
 
Slide share culture_code_template
Slide share culture_code_templateSlide share culture_code_template
Slide share culture_code_template
 
Webtech1b
Webtech1bWebtech1b
Webtech1b
 
Webtech1b
Webtech1bWebtech1b
Webtech1b
 
Webtech1b
Webtech1bWebtech1b
Webtech1b
 
Test
TestTest
Test
 
5x5
5x55x5
5x5
 
Lorem
LoremLorem
Lorem
 
SlideShare Hack Day 2013
SlideShare Hack Day 2013SlideShare Hack Day 2013
SlideShare Hack Day 2013
 
Profile Pictures
Profile PicturesProfile Pictures
Profile Pictures
 
SlideShare HACK Day 2013
SlideShare HACK Day 2013SlideShare HACK Day 2013
SlideShare HACK Day 2013
 
SlideShare HACK Day 2013
SlideShare HACK Day 2013SlideShare HACK Day 2013
SlideShare HACK Day 2013
 

Último

Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxNeo4j
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 

Último (20)

Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 

Road to code