SlideShare a Scribd company logo
Introduction to Javascript
History of JavascriptFirst appeared in 1995Main purpose was Input validationNetscape Navigator 3Cmm -> ScriptEase -> Expresso PagesBrendan EichMocha -> LiveScript -> JavascriptIE 3 & JscriptECMAScript – 1997
Javascript ImplementationThe Core (ECMAScript)Document Object Model (DOM)Browser Object Model (BOM)
Implementations of ECMAScriptJavascriptJScriptActionScriptEjscriptJSCript 3.0
DOMAPI for XML & HTML documentsHierarchy of Nodes
<html>	<head>		<title>DOM Example</title>	</head>	<body>		<p>Welcome to the DOM</p>	</body></html>​HTML Document
HTML	HEAD		TITLE			DOM Example	BODY		P			Welcome to the DOMDOM Hierarchy Representation
DOMControl of Content & StructureAdd, remove and modify nodesStandardsLevelsDOM Level 0DOM Level 1DOM Level 2DOM Level 3
DOMLevel 0Netscape Navigator 3 & IE 3Primitive Level 1DOM CoreDOM HTML
DOMLevel 2ViewsEventsStylesTraversalRange
DOMLevel 3DOM Load & SaveDOM ValidationXpathXML Base
DOMOther DOMsScalable Vector Graphics (SVG)Mathematical Markup Language (MathML)Synchronized Multimedia Integration Language (SMIL)
DOMBrowser SupportLevel 0Netscape Navigator 4Internet Explorer 4Opera 1 – 6Level 1Netscape Navigator 6+Internet Explorer 5+Opera 7+Safari
DOMBrowser Support Cont..Level 2Internet Explorer 8Safari 2+ChromeOpera 7+Level 3Safari 3+Chrome 2+Firefox 1+Opera 9+
BOMInternet Explorer 3Interact with the BrowserNo Standards
BOMOpening windows – window.openMove, resize & close windowsNavigator object location objectscreen objectCookieXMLHttpRequest
Browser EnginesTridentGeckoWebKitKHTMLPresto
Javascript LanguageECMAScript 3rd EditionC, Perl SyntaxCase Sensitive
IdentifiersA-Z, a-z, 0-9, $, _Cannot use Keywords and reserved wordsComments//single-line comments/* */ multi-line comments
StatementsEnds with ;is optionalbut recommendedvar sum = a + bvar difference = a – b;
 StatementsMultiple statements  wrap in { }if (true === true) {varmsg = “hello”;alert(msg + “world”);}
break		else		new		varcase		finally		return		voidcatch		for		switch		whilecontinue		function		this		withdefault		if		throwdelete		in		trydo		instanceoftypeofKeywords
abstract		enumint		shortboolean		export		interface		staticbyte		extends		long		superchar		final		native		synchronizedclass		float		package		throwsconstgoto		private		transientdebugger		implements	protected		volatiledouble		import		publicReserved Words
VariablesLoosely typedCan hold any dataCan be modified and contain different type of value‘var’scope
function myFunction () {varmyVariables = ‘some string’;}alert(myVariables); //undefinedvar a = 1, b = ‘hello’, myArray = {};
DatatypesFive primitive datatypesUndefinedNullBooleanNumberString‘typeof’ operator‘objects’
Undefinedvar temp;alert(temp); 		//undefinedalert(typeof temp === ‘undefined’) //true
NullEmpty object pointervar temp = null;alert(null == undefined) //truealert(null === undefined) //false
BooleanBoolean()		      true		falseString		non-empty string	empty stringNumber		non-zero		0Object		any objectUndefined – falseNull - false
NumberIntegers & floating point valuesvarintNum = 100;		//integervaroctNum = 070;		//Octal for 56varhexNum = 0xA;		//Hex for 10var floatNum1 = 1.1;		//floatvar floatNum2 = 1.;		//1 integervar floatNum3 = 0.1;		//1 integervarlrgFloat = 3.125e7;	//31250000			//3.125 * 10^7
NumberNaN – not a numberisNaN()NaN === NaNisNaN(NaN);			//trueisNaN(10);			//falseisNaN(’10’);			//falseisNaN(‘cool’);		//trueisNaN(true);			//false
NumberNumber()Number.MIN_VALUENUMBER.MAX_VALUEInfinityisFinite()
StringObject

More Related Content

What's hot (20)

PPT
JavaScript
Reem Alattas
 
PPTX
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 
PDF
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Edureka!
 
PPTX
Javascript 101
Shlomi Komemi
 
PPTX
PHP Basics
Bhanuka Uyanage
 
PPTX
Intro to Javascript
Anjan Banda
 
PPTX
Javascript functions
Alaref Abushaala
 
PPT
Javascript Basics
Vishal Mittal
 
PPTX
Introduction To JavaScript
Reema
 
PPTX
An Introduction to JavaScript
tonyh1
 
PDF
Javascript - Tutorial
adelaticleanu
 
PPTX
JS Event Loop
Saai Vignesh P
 
PPTX
JavaScript Basics
Bhanuka Uyanage
 
PPTX
JS - Basics
John Fischer
 
PPT
eXo SEA - JavaScript Introduction Training
Hoat Le
 
PPT
JavaScript Basics
Mats Bryntse
 
PDF
Basics of JavaScript
Bala Narayanan
 
PDF
3. Java Script
Jalpesh Vasa
 
PDF
A Re-Introduction to JavaScript
Simon Willison
 
PDF
Fundamental JavaScript [UTC, March 2014]
Aaron Gustafson
 
JavaScript
Reem Alattas
 
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Edureka!
 
Javascript 101
Shlomi Komemi
 
PHP Basics
Bhanuka Uyanage
 
Intro to Javascript
Anjan Banda
 
Javascript functions
Alaref Abushaala
 
Javascript Basics
Vishal Mittal
 
Introduction To JavaScript
Reema
 
An Introduction to JavaScript
tonyh1
 
Javascript - Tutorial
adelaticleanu
 
JS Event Loop
Saai Vignesh P
 
JavaScript Basics
Bhanuka Uyanage
 
JS - Basics
John Fischer
 
eXo SEA - JavaScript Introduction Training
Hoat Le
 
JavaScript Basics
Mats Bryntse
 
Basics of JavaScript
Bala Narayanan
 
3. Java Script
Jalpesh Vasa
 
A Re-Introduction to JavaScript
Simon Willison
 
Fundamental JavaScript [UTC, March 2014]
Aaron Gustafson
 

Viewers also liked (6)

PPTX
Knockout
LearningTech
 
PPTX
JavaScript: a very short introduction
Nate Barbettini
 
PPTX
Introduction to Javascript
foOfys Solutions
 
PPTX
Javascript basics for automation testing
Vikas Thange
 
PPTX
JavaScript Introduction
Designveloper
 
PPT
Js ppt
Rakhi Thota
 
Knockout
LearningTech
 
JavaScript: a very short introduction
Nate Barbettini
 
Introduction to Javascript
foOfys Solutions
 
Javascript basics for automation testing
Vikas Thange
 
JavaScript Introduction
Designveloper
 
Js ppt
Rakhi Thota
 
Ad

Similar to Javascript session 01 - Introduction to Javascript (20)

PDF
Jscript Fundamentals
rspaike
 
PPT
JavaScript Workshop
Pamela Fox
 
PPTX
01_JavaScript_Advanced Level_Pratahb.pptx
prathabtwsi
 
PPT
Javascript
mussawir20
 
PPTX
copa-ii.pptx
ERHariramPrajapat
 
PPTX
JavaScript | Introduction
Velimir Bulatovic
 
PDF
Training javascript 2012 hcmut
University of Technology
 
PPT
Java script
vishal choudhary
 
ODP
JavaScript and jQuery Fundamentals
BG Java EE Course
 
PPTX
Learning JavaScript Programming
Hriday Ahmed
 
PPTX
Introduction to JavaScrtipt
sesharao puvvada
 
PPT
JavaScript & Dom Manipulation
Mohammed Arif
 
PDF
Javascriptbootcamp
oscon2007
 
PPTX
JavaScripts & jQuery
Asanka Indrajith
 
PDF
javascript teach
guest3732fa
 
PDF
JSBootcamp_White
guest3732fa
 
PPT
Introduction to JavaScript
Andres Baravalle
 
PPTX
JavaScript fundamental data types and functions
Andre Odendaal
 
PDF
Client side scripting
Eleonora Ciceri
 
Jscript Fundamentals
rspaike
 
JavaScript Workshop
Pamela Fox
 
01_JavaScript_Advanced Level_Pratahb.pptx
prathabtwsi
 
Javascript
mussawir20
 
copa-ii.pptx
ERHariramPrajapat
 
JavaScript | Introduction
Velimir Bulatovic
 
Training javascript 2012 hcmut
University of Technology
 
Java script
vishal choudhary
 
JavaScript and jQuery Fundamentals
BG Java EE Course
 
Learning JavaScript Programming
Hriday Ahmed
 
Introduction to JavaScrtipt
sesharao puvvada
 
JavaScript & Dom Manipulation
Mohammed Arif
 
Javascriptbootcamp
oscon2007
 
JavaScripts & jQuery
Asanka Indrajith
 
javascript teach
guest3732fa
 
JSBootcamp_White
guest3732fa
 
Introduction to JavaScript
Andres Baravalle
 
JavaScript fundamental data types and functions
Andre Odendaal
 
Client side scripting
Eleonora Ciceri
 
Ad

Recently uploaded (20)

PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 

Javascript session 01 - Introduction to Javascript