SlideShare a Scribd company logo
Introduction to JavaScript
Programming
www.collaborationtech.co.in
Bengaluru INDIA
Presentation By
Ramananda M.S Rao
Introduction to JavaScript Basics
Content
What is JavaScript ?
Where JavaScript is used?
JavaScript Frameworks
Writing JavaScript Code
Using External JavaScript File
Benefits of using External Files
JavaScript Variables
JavaScript Operators
Arrays
Control Structures
Using JavaScript in HTML code
About Us
www.collaborationtech.co.in
Introduction to JavaScript Basics
What is JavaScript?
 Interpreted programming or scripting language from Netscape.
 Easier to code than the compiled languages like C and C++.
 Lightweight and most commonly used script in web pages.
 Allow client-side user to interact and create dynamic pages.
 Cross-platform and object-oriented scripting language.
 Most popular programming language in the world.
 High level, dynamic and untyped programming language.
 Standardized in the ECMAScript language specification.
 Used for shorter programs
 Takes longer time to process than compiled languages.
www.collaborationtech.co.in
Introduction to JavaScript Basics
JavaScript Variables
There are two types of variables: local and global. You declare local variables
using the var keyword and global variables without using the var keyword.
With the var keyword the variable is considered local because it cannot be
accessed anywhere outside the scope of the place you declare it. For
example, declaring a local variable inside a function, it cannot be accessed
outside of that function, which makes it local to that function.
Declaring the same variable without the var keyword, it is accessible
throughout the entire script, not only within that function. Which makes it
global within script tag.
Declaring a local variable
var num = 10;
To access the value of the num variable at another point in the script, you
simply reference the variable by name Ex:
document.write("The value of num is: "+ num);
www.collaborationtech.co.in
Introduction to JavaScript Basics
JavaScript Operators
I. You need operators when performing any operation in the
JavaScript language. Operations include addition,
subtraction, comparison, and so on. There are four types of
operators in the JavaScript language.
II. Arithmetic
III. Assignment
IV. Comparison
V. Logical
www.collaborationtech.co.in
Introduction to JavaScript Basics
Logical operators
 Logical operators are generally used in conditional statements to
combine comparison operators.
 list describes all the logical operators available in the JavaScript
language.
Logical operators
 Operator Description
 && AND
 || OR
 ! NOT
www.collaborationtech.co.in
Introduction to JavaScript Basics
Arrays
 Arrays are similar to variables, but they can hold multiple values.
 There is no limit to the amount or type of data that you can store in a
JavaScript array
 We can access any value of any item in an array at any time after
declaring it.
 Arrays can hold any data type in the JavaScript language.
 Arrays can store only similar data in any one array.
Storing similar values in an array
var colors = new Array("orange", "blue", "red", "brown");
var shapes = new Array("circle", "square", "triangle", "pentagon");
Accessing values in an array is easy, but there is a catch. Arrays always start
with an ID of 0, rather than 1.
To access an array item you must use its ID, which refers to the item's
position in the array
www.collaborationtech.co.in
Introduction to JavaScript Basics
Control Structures
Conditional statements
 Conditional statements are the backbone for creating any type of logic
in a scripting or programming language, and the JavaScript language is
no exception.
 Conditional statements determine what action to take based on the
conditions you script. There are four ways to write conditional
statements in the JavaScript language, which are described in Table
Conditional statements Statement
If -Used to execute a script if a specific condition is true
if...else -Used to execute one script if a specific condition is true or another
script if the condition is false
if...else if...else -Used to execute one script if one of unlimited conditions is
true or another script if all conditions are false
Switch- Used to execute one of many scripts
A>B ? document.write(‘a’): document.write(‘b’)
www.collaborationtech.co.in
Introduction to JavaScript Basics
Functions
 Functions are containers for script that is only to be executed by an
event or a call to the function.
 Functions do not execute when the browser initially loads and
executes the script that is included in a web page.
 The purpose of a function is to contain script that has a task so that
you then have the ability to execute that script and run that task at
any time.
Structuring a simple function
var num = 10;
function changeVariableValue()
{ num = 11; }
changeVariableValue();
document.write("num is: "+ num);
www.collaborationtech.co.in
Introduction to JavaScript Basics
Using JavaScript in HTML code
<html><head><title>checkbox</title>
<script language="javascript">
function calme(fm){
if(fm.r1.checked){
alert("checkbox checked");
}
else
{ alert("checkbox not ");
}
}
</script>
</head>
<body>
<form name="box">
<input type="checkbox" name="r1" checked>
<input type="button" name="b1" value="clickme" onclick="calme(this.form)">
</form>
</body>
</html>
www.collaborationtech.co.in
Follow us on Social
Facebook: https://www.facebook.com/collaborationtechnologies/
Twitter : https://twitter.com/collaboration09
Google Plus : https://plus.google.com/100704494006819853579
LinkedIn : https://www.linkedin.com/in/ramananda-rao-a2012545
Instagram : https://instagram.com/collaborationtechnologies
YouTube :
https://www.youtube.com/channel/UCm9nK56LRbWSqcYWbzs8CUg
Skype : facebook:ramananda.rao.7
WhatsApp : +91 9886272445
www.collaborationtech.co.in
THANK YOU
About Us

More Related Content

What's hot (20)

PPTX
Complete Notes on Angular 2 and TypeScript
EPAM Systems
 
PPTX
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 
PPT
Web development basics (Part-4)
Rajat Pratap Singh
 
PPTX
JS - Basics
John Fischer
 
PPTX
Javascript functions
Alaref Abushaala
 
PPTX
An Introduction to JavaScript
tonyh1
 
PPTX
Lab #2: Introduction to Javascript
Walid Ashraf
 
PPT
Introduction to Javascript
Amit Tyagi
 
PPTX
Introduction to JavaScript
Rangana Sampath
 
PPTX
Advanced Javascript
Dhruvin Shah
 
PPTX
Java script
Shyam Khant
 
PPTX
Placement and variable 03 (js)
AbhishekMondal42
 
PPTX
Java script
Rajkiran Mummadi
 
PPT
Java script -23jan2015
Sasidhar Kothuru
 
PPT
A Deeper look into Javascript Basics
Mindfire Solutions
 
PDF
Basics of JavaScript
Bala Narayanan
 
PPTX
Javascript
Nagarajan
 
PPTX
Introduction To JavaScript
Reema
 
PPT
Introduction to JavaScript
Andres Baravalle
 
Complete Notes on Angular 2 and TypeScript
EPAM Systems
 
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 
Web development basics (Part-4)
Rajat Pratap Singh
 
JS - Basics
John Fischer
 
Javascript functions
Alaref Abushaala
 
An Introduction to JavaScript
tonyh1
 
Lab #2: Introduction to Javascript
Walid Ashraf
 
Introduction to Javascript
Amit Tyagi
 
Introduction to JavaScript
Rangana Sampath
 
Advanced Javascript
Dhruvin Shah
 
Java script
Shyam Khant
 
Placement and variable 03 (js)
AbhishekMondal42
 
Java script
Rajkiran Mummadi
 
Java script -23jan2015
Sasidhar Kothuru
 
A Deeper look into Javascript Basics
Mindfire Solutions
 
Basics of JavaScript
Bala Narayanan
 
Javascript
Nagarajan
 
Introduction To JavaScript
Reema
 
Introduction to JavaScript
Andres Baravalle
 

Viewers also liked (20)

PDF
JavaScript Programming
Sehwan Noh
 
PPT
The JavaScript Programming Language
Raghavan Mohan
 
PDF
JavaScript: Past, Present, Future
Jungryul Choi
 
PPTX
Advanced JavaScript
Nascenia IT
 
PDF
15 Experts on the Art of JavaScript Programming
FusionCharts
 
PDF
Slack protips from Arkency
Andrzej Krzywda
 
PPTX
Advanced JavaScript Concepts
Naresh Kumar
 
DOCX
Advance java
Vivek Kumar Sinha
 
KEY
The JavaScript Programming Primer
Mike Wilcox
 
PDF
Fabrication and Performance Analysis of Downdraft Biomass Gasifier Using Suga...
IJSRD
 
PPTX
Introduction to JSON & AJAX
Collaboration Technologies
 
PPTX
Introduction to PHP
Collaboration Technologies
 
PDF
Introduction to web programming with JavaScript
T11 Sessions
 
PPTX
JavaScript 101
Mindy McAdams
 
PDF
Paris Web - Javascript as a programming language
Marco Cedaro
 
PDF
Reactive Programming with JavaScript
Codemotion
 
PDF
Webinar: MSc in Software, Systems and Services Development in Global Environment
Web2Present
 
PDF
Javascript Tutorial
Kang-min Liu
 
PPTX
Introduction to jQuery
Collaboration Technologies
 
PPTX
An Introduction to the DOM
Mindy McAdams
 
JavaScript Programming
Sehwan Noh
 
The JavaScript Programming Language
Raghavan Mohan
 
JavaScript: Past, Present, Future
Jungryul Choi
 
Advanced JavaScript
Nascenia IT
 
15 Experts on the Art of JavaScript Programming
FusionCharts
 
Slack protips from Arkency
Andrzej Krzywda
 
Advanced JavaScript Concepts
Naresh Kumar
 
Advance java
Vivek Kumar Sinha
 
The JavaScript Programming Primer
Mike Wilcox
 
Fabrication and Performance Analysis of Downdraft Biomass Gasifier Using Suga...
IJSRD
 
Introduction to JSON & AJAX
Collaboration Technologies
 
Introduction to PHP
Collaboration Technologies
 
Introduction to web programming with JavaScript
T11 Sessions
 
JavaScript 101
Mindy McAdams
 
Paris Web - Javascript as a programming language
Marco Cedaro
 
Reactive Programming with JavaScript
Codemotion
 
Webinar: MSc in Software, Systems and Services Development in Global Environment
Web2Present
 
Javascript Tutorial
Kang-min Liu
 
Introduction to jQuery
Collaboration Technologies
 
An Introduction to the DOM
Mindy McAdams
 
Ad

Similar to Introduction to JavaScript Programming (20)

PPTX
Pawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptx
ramtiwari7081
 
PPTX
Pawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptx
ramtiwari7081
 
DOC
Basics java scripts
ch samaram
 
PDF
JavaScript Interview Questions PDF By ScholarHat
Scholarhat
 
PDF
internet Chapter 4-JavascripPrepare a ppt of video compression techniques bas...
wabii3179com
 
PPTX
Basics of Javascript
poojanov04
 
PPTX
Introduction to JAVA SCRIPT USING HTML and CSS
ManasaMR2
 
PDF
Javascript tutorial basic for starter
Marcello Harford
 
PPTX
Java script
GowriLatha1
 
PDF
Ch3- Java Script.pdf
HASENSEID
 
PPTX
Powerpoint about JavaScript presentation
XaiMaeChanelleSopsop
 
PPTX
WT Module-3.pptx
RamyaH11
 
PDF
Javascript pdf for beginners easy levell
SakshamGupta957136
 
PDF
3. Java Script
Jalpesh Vasa
 
PDF
Step by Step Guide on Essay Format in APA For Beginners
calltutors
 
PPTX
Java script
Sadeek Mohammed
 
PPT
chap04.ppt
Varsha Uchagaonkar
 
PPTX
WT Unit-3 PPT.pptx
TusharTikia
 
PPTX
js.pptx
SuhaibKhan62
 
PPTX
Java script
Abhishek Kesharwani
 
Pawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptx
ramtiwari7081
 
Pawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptx
ramtiwari7081
 
Basics java scripts
ch samaram
 
JavaScript Interview Questions PDF By ScholarHat
Scholarhat
 
internet Chapter 4-JavascripPrepare a ppt of video compression techniques bas...
wabii3179com
 
Basics of Javascript
poojanov04
 
Introduction to JAVA SCRIPT USING HTML and CSS
ManasaMR2
 
Javascript tutorial basic for starter
Marcello Harford
 
Java script
GowriLatha1
 
Ch3- Java Script.pdf
HASENSEID
 
Powerpoint about JavaScript presentation
XaiMaeChanelleSopsop
 
WT Module-3.pptx
RamyaH11
 
Javascript pdf for beginners easy levell
SakshamGupta957136
 
3. Java Script
Jalpesh Vasa
 
Step by Step Guide on Essay Format in APA For Beginners
calltutors
 
Java script
Sadeek Mohammed
 
chap04.ppt
Varsha Uchagaonkar
 
WT Unit-3 PPT.pptx
TusharTikia
 
js.pptx
SuhaibKhan62
 
Java script
Abhishek Kesharwani
 
Ad

More from Collaboration Technologies (14)

PPTX
Introduction to Core Java Programming
Collaboration Technologies
 
PPTX
Introduction to Database SQL & PL/SQL
Collaboration Technologies
 
PPTX
Introduction to Advanced Javascript
Collaboration Technologies
 
PPTX
Introduction to AngularJS
Collaboration Technologies
 
PPTX
Introduction to Bootstrap
Collaboration Technologies
 
PPTX
Introduction to Hibernate Framework
Collaboration Technologies
 
PPTX
Introduction to HTML4
Collaboration Technologies
 
PPTX
Introduction to HTML5
Collaboration Technologies
 
PPTX
Introduction to JPA Framework
Collaboration Technologies
 
PPTX
Introduction to Perl Programming
Collaboration Technologies
 
PPTX
Introduction to Python Basics Programming
Collaboration Technologies
 
PPTX
Introduction to Spring Framework
Collaboration Technologies
 
PPTX
Introduction to Struts 2
Collaboration Technologies
 
PPTX
Introduction to Node.JS
Collaboration Technologies
 
Introduction to Core Java Programming
Collaboration Technologies
 
Introduction to Database SQL & PL/SQL
Collaboration Technologies
 
Introduction to Advanced Javascript
Collaboration Technologies
 
Introduction to AngularJS
Collaboration Technologies
 
Introduction to Bootstrap
Collaboration Technologies
 
Introduction to Hibernate Framework
Collaboration Technologies
 
Introduction to HTML4
Collaboration Technologies
 
Introduction to HTML5
Collaboration Technologies
 
Introduction to JPA Framework
Collaboration Technologies
 
Introduction to Perl Programming
Collaboration Technologies
 
Introduction to Python Basics Programming
Collaboration Technologies
 
Introduction to Spring Framework
Collaboration Technologies
 
Introduction to Struts 2
Collaboration Technologies
 
Introduction to Node.JS
Collaboration Technologies
 

Recently uploaded (20)

PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
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
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 

Introduction to JavaScript Programming

  • 2. Introduction to JavaScript Basics Content What is JavaScript ? Where JavaScript is used? JavaScript Frameworks Writing JavaScript Code Using External JavaScript File Benefits of using External Files JavaScript Variables JavaScript Operators Arrays Control Structures Using JavaScript in HTML code About Us www.collaborationtech.co.in
  • 3. Introduction to JavaScript Basics What is JavaScript?  Interpreted programming or scripting language from Netscape.  Easier to code than the compiled languages like C and C++.  Lightweight and most commonly used script in web pages.  Allow client-side user to interact and create dynamic pages.  Cross-platform and object-oriented scripting language.  Most popular programming language in the world.  High level, dynamic and untyped programming language.  Standardized in the ECMAScript language specification.  Used for shorter programs  Takes longer time to process than compiled languages. www.collaborationtech.co.in
  • 4. Introduction to JavaScript Basics JavaScript Variables There are two types of variables: local and global. You declare local variables using the var keyword and global variables without using the var keyword. With the var keyword the variable is considered local because it cannot be accessed anywhere outside the scope of the place you declare it. For example, declaring a local variable inside a function, it cannot be accessed outside of that function, which makes it local to that function. Declaring the same variable without the var keyword, it is accessible throughout the entire script, not only within that function. Which makes it global within script tag. Declaring a local variable var num = 10; To access the value of the num variable at another point in the script, you simply reference the variable by name Ex: document.write("The value of num is: "+ num); www.collaborationtech.co.in
  • 5. Introduction to JavaScript Basics JavaScript Operators I. You need operators when performing any operation in the JavaScript language. Operations include addition, subtraction, comparison, and so on. There are four types of operators in the JavaScript language. II. Arithmetic III. Assignment IV. Comparison V. Logical www.collaborationtech.co.in
  • 6. Introduction to JavaScript Basics Logical operators  Logical operators are generally used in conditional statements to combine comparison operators.  list describes all the logical operators available in the JavaScript language. Logical operators  Operator Description  && AND  || OR  ! NOT www.collaborationtech.co.in
  • 7. Introduction to JavaScript Basics Arrays  Arrays are similar to variables, but they can hold multiple values.  There is no limit to the amount or type of data that you can store in a JavaScript array  We can access any value of any item in an array at any time after declaring it.  Arrays can hold any data type in the JavaScript language.  Arrays can store only similar data in any one array. Storing similar values in an array var colors = new Array("orange", "blue", "red", "brown"); var shapes = new Array("circle", "square", "triangle", "pentagon"); Accessing values in an array is easy, but there is a catch. Arrays always start with an ID of 0, rather than 1. To access an array item you must use its ID, which refers to the item's position in the array www.collaborationtech.co.in
  • 8. Introduction to JavaScript Basics Control Structures Conditional statements  Conditional statements are the backbone for creating any type of logic in a scripting or programming language, and the JavaScript language is no exception.  Conditional statements determine what action to take based on the conditions you script. There are four ways to write conditional statements in the JavaScript language, which are described in Table Conditional statements Statement If -Used to execute a script if a specific condition is true if...else -Used to execute one script if a specific condition is true or another script if the condition is false if...else if...else -Used to execute one script if one of unlimited conditions is true or another script if all conditions are false Switch- Used to execute one of many scripts A>B ? document.write(‘a’): document.write(‘b’) www.collaborationtech.co.in
  • 9. Introduction to JavaScript Basics Functions  Functions are containers for script that is only to be executed by an event or a call to the function.  Functions do not execute when the browser initially loads and executes the script that is included in a web page.  The purpose of a function is to contain script that has a task so that you then have the ability to execute that script and run that task at any time. Structuring a simple function var num = 10; function changeVariableValue() { num = 11; } changeVariableValue(); document.write("num is: "+ num); www.collaborationtech.co.in
  • 10. Introduction to JavaScript Basics Using JavaScript in HTML code <html><head><title>checkbox</title> <script language="javascript"> function calme(fm){ if(fm.r1.checked){ alert("checkbox checked"); } else { alert("checkbox not "); } } </script> </head> <body> <form name="box"> <input type="checkbox" name="r1" checked> <input type="button" name="b1" value="clickme" onclick="calme(this.form)"> </form> </body> </html> www.collaborationtech.co.in
  • 11. Follow us on Social Facebook: https://www.facebook.com/collaborationtechnologies/ Twitter : https://twitter.com/collaboration09 Google Plus : https://plus.google.com/100704494006819853579 LinkedIn : https://www.linkedin.com/in/ramananda-rao-a2012545 Instagram : https://instagram.com/collaborationtechnologies YouTube : https://www.youtube.com/channel/UCm9nK56LRbWSqcYWbzs8CUg Skype : facebook:ramananda.rao.7 WhatsApp : +91 9886272445 www.collaborationtech.co.in THANK YOU