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
Where JavaScript is used ?
 When a user requests an HTML page with JavaScript in it, the script is
sent to the browser.
 JavaScript used for creating dynamic web pages.
 The JavaScript language is a free, client-side scripting language
 Scripting adds interactivity to Hypertext Markup Language (HTML)
pages.
 Client-side means that the JavaScript language runs in the browser and
is not used on the server side.
 Client-side scripting allows user interactivity with a web page after the
web page is served by the server and loaded by the browser.
 Used in Web Forms Validations.
 Used in Web and Mobile Development
 Used to create Windows desktop applications
 Used to create cross-platform applications via frameworks.
 Used for Inserting and swapping Contents in Web Pages
 Used across various platforms and browsers
www.collaborationtech.co.in
Introduction to JavaScript Basics
Writing JavaScript Code
The script tags and type attribute are required to include
JavaScript code in an HTML file
<head>
<script type="text/javascript">
/*Example statement here */
// hello world
</script>
</head>
www.collaborationtech.co.in
Introduction to JavaScript Basics
Using External JavaScript File
<script type="text/javascript">
</script>
Use comments to hide JavaScript code from browsers that do not
support it
<script type="text/javascript" src=“js/javascript.js">
</script>
www.collaborationtech.co.in
Introduction to JavaScript Basics
Benefits of using External Files
 External JavaScript files are the most common way to include JavaScript code for
a number of practical reasons
 Search engines can crawl and index web site faster if there is less code within
HTML page.
 Keeping your JavaScript code separate from HTML is cleaner and ultimately
easier to manage.
 On Including multiple JavaScript files in HTML code we can separate the
JavaScript files into different folder structures on web server.
 Clean, organized code is always key to easily managing your website.
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
Storing similar values in an array
var colors = new Array("orange", "blue", "red", "brown");
document.write("Orange: "+ colors[0]);
document.write("Blue: "+ colors[1]);
document.write("Red: "+ colors[2]);
document.write("Brown: "+ colors[3]);
It is also possible to assign a value to a position in an array or update an
item's value in an array, just as you accessed an item in an array
Assigning values to specific positions in an array
var colors = new Array();
colors[0] = "orange"; colors[1] = "blue";
colors[2] = "red"; colors[3] = "brown";
document.write("Blue: "+ colors[1]);
// Update blue to purple
colors[1] = "purple";
document.write("Purple: "+ colors[1]);
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
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 : msrnanda
WhatsApp : +91 9886272445
www.collaborationtech.co.in
THANK YOU
About Us

More Related Content

What's hot (20)

Javascript session 01 - Introduction to Javascript
Javascript session 01 - Introduction to JavascriptJavascript session 01 - Introduction to Javascript
Javascript session 01 - Introduction to Javascript
Livingston Samuel
 
JS - Basics
JS - BasicsJS - Basics
JS - Basics
John Fischer
 
Introduction to JavaScript Basics.
Introduction to JavaScript Basics.Introduction to JavaScript Basics.
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
DHTMLExtreme
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
Adhoura Academy
 
Javascript Basics
Javascript BasicsJavascript Basics
Javascript Basics
Vishal Mittal
 
Java script
Java scriptJava script
Java script
Abhishek Kesharwani
 
JavaScript Basics
JavaScript BasicsJavaScript Basics
JavaScript Basics
Bhanuka Uyanage
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
Walid Ashraf
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Rangana Sampath
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
Bhanuka Uyanage
 
WEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScriptWEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScript
Jyothishmathi Institute of Technology and Science Karimnagar
 
Javascript - Tutorial
Javascript - TutorialJavascript - Tutorial
Javascript - Tutorial
adelaticleanu
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
shreesenthil
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
Amit Tyagi
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Andres Baravalle
 
Web programming
Web programmingWeb programming
Web programming
Leo Mark Villar
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
Sasidhar Kothuru
 
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Edureka!
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy steps
prince Loffar
 

Viewers also liked (14)

1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d
1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d
1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d
ashlinrockey
 
Even more java script best practices
Even more java script best practicesEven more java script best practices
Even more java script best practices
ChengHui Weng
 
Hugo - Introduction
Hugo - IntroductionHugo - Introduction
Hugo - Introduction
Eueung Mulyana
 
Web Development best practices
Web Development best practicesWeb Development best practices
Web Development best practices
Fadwa Gmiden
 
Show & tell - Who is Hugo?
Show & tell - Who is Hugo?Show & tell - Who is Hugo?
Show & tell - Who is Hugo?
Dan Dineen
 
U97 JavaScript Webinar
U97 JavaScript WebinarU97 JavaScript Webinar
U97 JavaScript Webinar
Uniface
 
JavaScript Full-Stack Development Course Session 01
JavaScript Full-Stack Development Course Session 01JavaScript Full-Stack Development Course Session 01
JavaScript Full-Stack Development Course Session 01
Basir Jafarzadeh
 
Graphic Design For Web
Graphic Design For WebGraphic Design For Web
Graphic Design For Web
Deniz Gökçe
 
Starting with Reactjs
Starting with ReactjsStarting with Reactjs
Starting with Reactjs
Thinh VoXuan
 
003. ReactJS basic
003. ReactJS basic003. ReactJS basic
003. ReactJS basic
Binh Quan Duc
 
Reactjs
Reactjs Reactjs
Reactjs
Neha Sharma
 
Getting Started with Pelican
Getting Started with PelicanGetting Started with Pelican
Getting Started with Pelican
Nazrul Kamaruddin
 
Presentation on Gatsby to SF Static Web Tech Meetup
Presentation on Gatsby to SF Static Web Tech MeetupPresentation on Gatsby to SF Static Web Tech Meetup
Presentation on Gatsby to SF Static Web Tech Meetup
Kyle Mathews
 
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Ryan Weaver
 
1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d
1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d
1335829820.8071 integrated%20hospital%20management%20system%20%5bihms%5d
ashlinrockey
 
Even more java script best practices
Even more java script best practicesEven more java script best practices
Even more java script best practices
ChengHui Weng
 
Web Development best practices
Web Development best practicesWeb Development best practices
Web Development best practices
Fadwa Gmiden
 
Show & tell - Who is Hugo?
Show & tell - Who is Hugo?Show & tell - Who is Hugo?
Show & tell - Who is Hugo?
Dan Dineen
 
U97 JavaScript Webinar
U97 JavaScript WebinarU97 JavaScript Webinar
U97 JavaScript Webinar
Uniface
 
JavaScript Full-Stack Development Course Session 01
JavaScript Full-Stack Development Course Session 01JavaScript Full-Stack Development Course Session 01
JavaScript Full-Stack Development Course Session 01
Basir Jafarzadeh
 
Graphic Design For Web
Graphic Design For WebGraphic Design For Web
Graphic Design For Web
Deniz Gökçe
 
Starting with Reactjs
Starting with ReactjsStarting with Reactjs
Starting with Reactjs
Thinh VoXuan
 
Getting Started with Pelican
Getting Started with PelicanGetting Started with Pelican
Getting Started with Pelican
Nazrul Kamaruddin
 
Presentation on Gatsby to SF Static Web Tech Meetup
Presentation on Gatsby to SF Static Web Tech MeetupPresentation on Gatsby to SF Static Web Tech Meetup
Presentation on Gatsby to SF Static Web Tech Meetup
Kyle Mathews
 
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Finally, Professional Frontend Dev with ReactJS, WebPack & Symfony (Symfony C...
Ryan Weaver
 
Ad

Similar to Introduction to JavaScript Programming (20)

Pawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptx
Pawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptxPawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptx
Pawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptx
ramtiwari7081
 
Pawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptx
Pawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptxPawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptx
Pawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptx
ramtiwari7081
 
Java script
Java scriptJava script
Java script
Shyam Khant
 
gdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxgdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
Javascript tutorial basic for starter
Javascript tutorial basic for starterJavascript tutorial basic for starter
Javascript tutorial basic for starter
Marcello Harford
 
Unit - 4 all script are here Javascript.pptx
Unit - 4 all script are here Javascript.pptxUnit - 4 all script are here Javascript.pptx
Unit - 4 all script are here Javascript.pptx
kushwahanitesh592
 
Java script.pptx v
Java script.pptx                                     vJava script.pptx                                     v
Java script.pptx v
22x026
 
Unit 2.4
Unit 2.4Unit 2.4
Unit 2.4
Abhishek Kesharwani
 
JavaScript_III.pptx
JavaScript_III.pptxJavaScript_III.pptx
JavaScript_III.pptx
rashmiisrani1
 
JavaScript ppt for introduction of javascripta
JavaScript ppt for introduction of javascriptaJavaScript ppt for introduction of javascripta
JavaScript ppt for introduction of javascripta
nehatanveer5765
 
Java Script
Java ScriptJava Script
Java Script
Sarvan15
 
Java Script
Java ScriptJava Script
Java Script
Sarvan15
 
Presentation JavaScript Introduction Data Types Variables Control Structure
Presentation JavaScript Introduction  Data Types Variables Control StructurePresentation JavaScript Introduction  Data Types Variables Control Structure
Presentation JavaScript Introduction Data Types Variables Control Structure
SripathiRavi1
 
JavaScript Notes 🔥.pdfssssssssssssssssssssssssssssssssssssssssss
JavaScript Notes 🔥.pdfssssssssssssssssssssssssssssssssssssssssssJavaScript Notes 🔥.pdfssssssssssssssssssssssssssssssssssssssssss
JavaScript Notes 🔥.pdfssssssssssssssssssssssssssssssssssssssssss
youssefsoulali2
 
Unit 2.5
Unit 2.5Unit 2.5
Unit 2.5
Abhishek Kesharwani
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
Toni Kolev
 
Getting Started with JavaScript
Getting Started with JavaScriptGetting Started with JavaScript
Getting Started with JavaScript
Kevin Hoyt
 
Powerpoint about JavaScript presentation
Powerpoint about JavaScript presentationPowerpoint about JavaScript presentation
Powerpoint about JavaScript presentation
XaiMaeChanelleSopsop
 
JavaScript_introduction_upload.pdf
JavaScript_introduction_upload.pdfJavaScript_introduction_upload.pdf
JavaScript_introduction_upload.pdf
Kongu Engineering College, Perundurai, Erode
 
Java scripts
Java scriptsJava scripts
Java scripts
Capgemini India
 
Pawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptx
Pawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptxPawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptx
Pawanasfdcvgfgfxgndrfdrxjdrfmjfgtdtdt.pptx
ramtiwari7081
 
Pawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptx
Pawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptxPawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptx
Pawangvvhgvhg hbhvhhhhvhjjkvhvghvhgh.pptx
ramtiwari7081
 
gdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptxgdscWorkShopJavascriptintroductions.pptx
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
Javascript tutorial basic for starter
Javascript tutorial basic for starterJavascript tutorial basic for starter
Javascript tutorial basic for starter
Marcello Harford
 
Unit - 4 all script are here Javascript.pptx
Unit - 4 all script are here Javascript.pptxUnit - 4 all script are here Javascript.pptx
Unit - 4 all script are here Javascript.pptx
kushwahanitesh592
 
Java script.pptx v
Java script.pptx                                     vJava script.pptx                                     v
Java script.pptx v
22x026
 
JavaScript ppt for introduction of javascripta
JavaScript ppt for introduction of javascriptaJavaScript ppt for introduction of javascripta
JavaScript ppt for introduction of javascripta
nehatanveer5765
 
Java Script
Java ScriptJava Script
Java Script
Sarvan15
 
Java Script
Java ScriptJava Script
Java Script
Sarvan15
 
Presentation JavaScript Introduction Data Types Variables Control Structure
Presentation JavaScript Introduction  Data Types Variables Control StructurePresentation JavaScript Introduction  Data Types Variables Control Structure
Presentation JavaScript Introduction Data Types Variables Control Structure
SripathiRavi1
 
JavaScript Notes 🔥.pdfssssssssssssssssssssssssssssssssssssssssss
JavaScript Notes 🔥.pdfssssssssssssssssssssssssssssssssssssssssssJavaScript Notes 🔥.pdfssssssssssssssssssssssssssssssssssssssssss
JavaScript Notes 🔥.pdfssssssssssssssssssssssssssssssssssssssssss
youssefsoulali2
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
Toni Kolev
 
Getting Started with JavaScript
Getting Started with JavaScriptGetting Started with JavaScript
Getting Started with JavaScript
Kevin Hoyt
 
Powerpoint about JavaScript presentation
Powerpoint about JavaScript presentationPowerpoint about JavaScript presentation
Powerpoint about JavaScript presentation
XaiMaeChanelleSopsop
 
Ad

More from Raveendra R (7)

Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Raveendra R
 
Introduction to Hibernate Framework
Introduction to Hibernate FrameworkIntroduction to Hibernate Framework
Introduction to Hibernate Framework
Raveendra R
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
Raveendra R
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android Programming
Raveendra R
 
Introduction to JSON & AJAX
Introduction to JSON & AJAXIntroduction to JSON & AJAX
Introduction to JSON & AJAX
Raveendra R
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java Programming
Raveendra R
 
Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
Raveendra R
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Raveendra R
 
Introduction to Hibernate Framework
Introduction to Hibernate FrameworkIntroduction to Hibernate Framework
Introduction to Hibernate Framework
Raveendra R
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
Raveendra R
 
Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android Programming
Raveendra R
 
Introduction to JSON & AJAX
Introduction to JSON & AJAXIntroduction to JSON & AJAX
Introduction to JSON & AJAX
Raveendra R
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java Programming
Raveendra R
 
Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
Raveendra R
 

Recently uploaded (20)

Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
Domino IQ – Was Sie erwartet, erste Schritte und AnwendungsfälleDomino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
panagenda
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Cisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdfCisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdf
superdpz
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME FlowProviding an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdfEdge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
Introduction to Internet of things .ppt.
Introduction to Internet of things .ppt.Introduction to Internet of things .ppt.
Introduction to Internet of things .ppt.
hok12341073
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
Domino IQ – Was Sie erwartet, erste Schritte und AnwendungsfälleDomino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
Domino IQ – Was Sie erwartet, erste Schritte und Anwendungsfälle
panagenda
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Cisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdfCisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdf
superdpz
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME FlowProviding an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
How to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptxHow to Detect Outliers in IBM SPSS Statistics.pptx
How to Detect Outliers in IBM SPSS Statistics.pptx
Version 1 Analytics
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdfEdge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
Introduction to Internet of things .ppt.
Introduction to Internet of things .ppt.Introduction to Internet of things .ppt.
Introduction to Internet of things .ppt.
hok12341073
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 

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 Where JavaScript is used ?  When a user requests an HTML page with JavaScript in it, the script is sent to the browser.  JavaScript used for creating dynamic web pages.  The JavaScript language is a free, client-side scripting language  Scripting adds interactivity to Hypertext Markup Language (HTML) pages.  Client-side means that the JavaScript language runs in the browser and is not used on the server side.  Client-side scripting allows user interactivity with a web page after the web page is served by the server and loaded by the browser.  Used in Web Forms Validations.  Used in Web and Mobile Development  Used to create Windows desktop applications  Used to create cross-platform applications via frameworks.  Used for Inserting and swapping Contents in Web Pages  Used across various platforms and browsers www.collaborationtech.co.in
  • 5. Introduction to JavaScript Basics Writing JavaScript Code The script tags and type attribute are required to include JavaScript code in an HTML file <head> <script type="text/javascript"> /*Example statement here */ // hello world </script> </head> www.collaborationtech.co.in
  • 6. Introduction to JavaScript Basics Using External JavaScript File <script type="text/javascript"> </script> Use comments to hide JavaScript code from browsers that do not support it <script type="text/javascript" src=“js/javascript.js"> </script> www.collaborationtech.co.in
  • 7. Introduction to JavaScript Basics Benefits of using External Files  External JavaScript files are the most common way to include JavaScript code for a number of practical reasons  Search engines can crawl and index web site faster if there is less code within HTML page.  Keeping your JavaScript code separate from HTML is cleaner and ultimately easier to manage.  On Including multiple JavaScript files in HTML code we can separate the JavaScript files into different folder structures on web server.  Clean, organized code is always key to easily managing your website. www.collaborationtech.co.in
  • 8. 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
  • 9. 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
  • 10. 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
  • 11. 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
  • 12. Introduction to JavaScript Basics Storing similar values in an array var colors = new Array("orange", "blue", "red", "brown"); document.write("Orange: "+ colors[0]); document.write("Blue: "+ colors[1]); document.write("Red: "+ colors[2]); document.write("Brown: "+ colors[3]); It is also possible to assign a value to a position in an array or update an item's value in an array, just as you accessed an item in an array Assigning values to specific positions in an array var colors = new Array(); colors[0] = "orange"; colors[1] = "blue"; colors[2] = "red"; colors[3] = "brown"; document.write("Blue: "+ colors[1]); // Update blue to purple colors[1] = "purple"; document.write("Purple: "+ colors[1]); www.collaborationtech.co.in
  • 13. 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
  • 14. 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
  • 15. 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 : msrnanda WhatsApp : +91 9886272445 www.collaborationtech.co.in THANK YOU