SlideShare a Scribd company logo
1 of 17
JavaScript
“A simple way to get more.”
Abhay Dhupar
abhaydhupar123@gmail.com
What is JavaScript ?
• JavaScript is one of the most popular and widely used programming language in the world
right now.
• It’s growing faster than other programming languages and big companies like Netflix,
Walmart and Paypal build their entire applications around JavaScript.
•
• US offers 75000 dollars per annum to JavaScript developers on an average.
• You can work as a -
Front-end
Developer
Back-end
Developer
Full-stack
Developer
What can you do with JavaScript ?
• For a long time, JavaScript was only used in browsers to build interactive web pages.
• Some developers referred to JavaScript as a toy language, but those days are gone because
of huge community support and investments like large companies like facebook and google.
• These days you can build -
Web / Mobile
Apps
Command-line
Tools
Real-time
Networking
Apps
Games
Where does JavaScript code run ?
• JavaScript was originally designed to run only in browsers. So every browser has JavaScript
Engine that can run JavaScript code. In Chrome, this engine is v8.
• In 2009, a very clever engineer called Ryan Dahl took the open source JavaScript Engine in
Chrome and embedded it in a C++ program. He called that program Node.
• So Node is a C++ program which includes Google’s v8 JavaScript Engine. Now with this, we
can run our JavaScript code outside of a browser. So we can pass our JavaScript code to
node for execution. So with JavaScript, we can build the backend for our web and our
mobile applications.
• Browser and Node provide a runtime environment for our JavaScript code.
Let’s see JavaScript in action.
Editor and Other requirements
• In order to write JavaScript code, you’ll need a code edit a code editor
• Following are some of the commonly used -
VS Code Sublime Atom
Download Node
• Technically, you don’t need Node on your machine for learning JavaScript, as you can do in
browser as well.
• But it is good to have Node in your machine to install third party libraries.
JS through web browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>Hello Abhay</h1>
<script>
console.log("Hello World") //Output(in your browser) inspect -> console
</script>
</body>
</html>
Separation of Concerns
• Now while we can easily write JavaScript code in between the script element. In a real-world
application, you have thousands or even million lines of code.
• We don't want to write all that code inline here we want to extract and separate our
JavaScript code from our HTML code.
• Let’s understand by a metaphor - Think of your house. In your bedroom, you have your bed
and your clothes.
• You don’t store your clothes in the kitchen. This is what we call separation of concerns.
• We have the same principle in programming, so we want to separate HTML which is all
about content from JavaScript which is all about behavior.
Cont…
JS through Node
• Open your .js file location.
• Open up cmd or terminal at same location.
• Now write node file_name.js
• Use Integrated terminal in VS Code.
Variables
• We use variables to store data temporarily.
• Use var keyword to declare a variable.
• There are issues with var, we can also use let
• Ex - var my_name = 'Abhay';
console.log(my_name);
Rules
• It cannot be a reserved word.
• It cannot be start with a number.
• It cannot contain a space or hyphen (–). We can either use CamelNotation.
• It is case sensitive.
What type of value can we store ?
JavaScript : A Dynamic Language
Object
• Object is a real world entity.
• For example – instead of giving name, age of a person; we can create a person object.
• Ex -
let person = {
name: 'Abhay',
age: 30
};
// dot notation
person.name = 'John';
// Bracket notation
person['name'] = 'Mary';
console.log(person);
Arrays
• Array in JS is also a object.
• Sometimes in your application, you need to deal with list of objects.
• So to store that list of objects, we need arrays.
• Since JS is dynamic so size and data type in array can change in run time.
• Ex – list of product, list of students.
let array = ['Abhay','CSE']
array[2] = 1
console.log(array)
console.log(array.length)
console.log(typeof(array));
Functions
• Functions are one of the fundamental building blocks in JS.
• Functions are used to perform a task.
• function keyword is used to declare a function.
function greet(fname, lname) {
console.log('Hello '+ fname + ' ' + lname)
}
greet('Abhay','Dhupar');

More Related Content

What's hot

Web development basics (Part-3)
Web development basics (Part-3)Web development basics (Part-3)
Web development basics (Part-3)Rajat Pratap Singh
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumTechday7
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationAndrew Rota
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsJulien Lecomte
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynotedmethvin
 
Expens-O-Meter, a web based tool built using Ruby on Rails
Expens-O-Meter, a web based tool built using Ruby on RailsExpens-O-Meter, a web based tool built using Ruby on Rails
Expens-O-Meter, a web based tool built using Ruby on Railsjatinder
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)Rajat Pratap Singh
 
Grails 0.3-SNAPSHOT Presentation WJAX 2006 English
Grails 0.3-SNAPSHOT Presentation WJAX 2006 EnglishGrails 0.3-SNAPSHOT Presentation WJAX 2006 English
Grails 0.3-SNAPSHOT Presentation WJAX 2006 EnglishSven Haiges
 
Lunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraLunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraMarc Seeger
 
Instagram filters
Instagram filters Instagram filters
Instagram filters Thinkful
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web componentsJarrod Overson
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with CucumberBen Mabey
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Thinkful
 
A Minimalist’s Attempt at Building a Distributed Application
A Minimalist’s Attempt at Building a Distributed ApplicationA Minimalist’s Attempt at Building a Distributed Application
A Minimalist’s Attempt at Building a Distributed ApplicationDavid Hoerster
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme FrameworkJoe Casabona
 
Web development basics (Part-7)
Web development basics (Part-7)Web development basics (Part-7)
Web development basics (Part-7)Rajat Pratap Singh
 

What's hot (20)

Web development basics (Part-3)
Web development basics (Part-3)Web development basics (Part-3)
Web development basics (Part-3)
 
Javascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to TitaniumJavascript Best Practices and Intro to Titanium
Javascript Best Practices and Intro to Titanium
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Please dont touch-3.6-jsday
Please dont touch-3.6-jsdayPlease dont touch-3.6-jsday
Please dont touch-3.6-jsday
 
jQuery Conference 2012 keynote
jQuery Conference 2012 keynotejQuery Conference 2012 keynote
jQuery Conference 2012 keynote
 
Expens-O-Meter, a web based tool built using Ruby on Rails
Expens-O-Meter, a web based tool built using Ruby on RailsExpens-O-Meter, a web based tool built using Ruby on Rails
Expens-O-Meter, a web based tool built using Ruby on Rails
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)
 
Grails 0.3-SNAPSHOT Presentation WJAX 2006 English
Grails 0.3-SNAPSHOT Presentation WJAX 2006 EnglishGrails 0.3-SNAPSHOT Presentation WJAX 2006 English
Grails 0.3-SNAPSHOT Presentation WJAX 2006 English
 
Lunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraLunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and Capybara
 
Instagram filters
Instagram filters Instagram filters
Instagram filters
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
 
Web application intro
Web application introWeb application intro
Web application intro
 
Writing Software not Code with Cucumber
Writing Software not Code with CucumberWriting Software not Code with Cucumber
Writing Software not Code with Cucumber
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)
 
A Minimalist’s Attempt at Building a Distributed Application
A Minimalist’s Attempt at Building a Distributed ApplicationA Minimalist’s Attempt at Building a Distributed Application
A Minimalist’s Attempt at Building a Distributed Application
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme Framework
 
Web development basics (Part-7)
Web development basics (Part-7)Web development basics (Part-7)
Web development basics (Part-7)
 
Javascript projects Course
Javascript projects CourseJavascript projects Course
Javascript projects Course
 

Similar to JavaScript : A trending scripting language

Lect-5--JavaScript-Intro-12032024-105816am.pptx
Lect-5--JavaScript-Intro-12032024-105816am.pptxLect-5--JavaScript-Intro-12032024-105816am.pptx
Lect-5--JavaScript-Intro-12032024-105816am.pptxzainm7032
 
JavaScript New Tutorial Class XI and XII.pptx
JavaScript New Tutorial Class XI and XII.pptxJavaScript New Tutorial Class XI and XII.pptx
JavaScript New Tutorial Class XI and XII.pptxrish15r890
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An IntroductionNirvanic Labs
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Gil Irizarry
 
General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptSpike Brehm
 
WT Unit-3 PPT.pptx
WT Unit-3 PPT.pptxWT Unit-3 PPT.pptx
WT Unit-3 PPT.pptxTusharTikia
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineIrfan Maulana
 
Intro to JavaScript - Thinkful LA, June 2017
Intro to JavaScript - Thinkful LA, June 2017Intro to JavaScript - Thinkful LA, June 2017
Intro to JavaScript - Thinkful LA, June 2017Thinkful
 
Final Java-script.pptx
Final Java-script.pptxFinal Java-script.pptx
Final Java-script.pptxAlkanthiSomesh
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteChristian Heilmann
 
Isomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassIsomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassSpike Brehm
 

Similar to JavaScript : A trending scripting language (20)

Lect-5--JavaScript-Intro-12032024-105816am.pptx
Lect-5--JavaScript-Intro-12032024-105816am.pptxLect-5--JavaScript-Intro-12032024-105816am.pptx
Lect-5--JavaScript-Intro-12032024-105816am.pptx
 
Java script
Java scriptJava script
Java script
 
Java script
Java scriptJava script
Java script
 
JavaScript New Tutorial Class XI and XII.pptx
JavaScript New Tutorial Class XI and XII.pptxJavaScript New Tutorial Class XI and XII.pptx
JavaScript New Tutorial Class XI and XII.pptx
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An Introduction
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Welcome to React.pptx
Welcome to React.pptxWelcome to React.pptx
Welcome to React.pptx
 
General Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScriptGeneral Assembly Workshop: Advanced JavaScript
General Assembly Workshop: Advanced JavaScript
 
WT Unit-3 PPT.pptx
WT Unit-3 PPT.pptxWT Unit-3 PPT.pptx
WT Unit-3 PPT.pptx
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The Machine
 
JavaScript_III.pptx
JavaScript_III.pptxJavaScript_III.pptx
JavaScript_III.pptx
 
Java script
Java scriptJava script
Java script
 
Java script
Java scriptJava script
Java script
 
JavaScript_introduction_upload.pdf
JavaScript_introduction_upload.pdfJavaScript_introduction_upload.pdf
JavaScript_introduction_upload.pdf
 
Java script
Java scriptJava script
Java script
 
Intro to JavaScript - Thinkful LA, June 2017
Intro to JavaScript - Thinkful LA, June 2017Intro to JavaScript - Thinkful LA, June 2017
Intro to JavaScript - Thinkful LA, June 2017
 
Final Java-script.pptx
Final Java-script.pptxFinal Java-script.pptx
Final Java-script.pptx
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
Isomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassIsomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master Class
 

More from AbhayDhupar

What is Data analytics and it's importance ?
What is Data analytics and it's importance ?What is Data analytics and it's importance ?
What is Data analytics and it's importance ?AbhayDhupar
 
Internet & it's concepts
Internet & it's conceptsInternet & it's concepts
Internet & it's conceptsAbhayDhupar
 
Types of grammer - TOC
Types of grammer - TOCTypes of grammer - TOC
Types of grammer - TOCAbhayDhupar
 
Successive Approximation ADC
Successive Approximation ADC Successive Approximation ADC
Successive Approximation ADC AbhayDhupar
 
Sets and its types-
 Sets and its types- Sets and its types-
Sets and its types-AbhayDhupar
 

More from AbhayDhupar (8)

What is Data analytics and it's importance ?
What is Data analytics and it's importance ?What is Data analytics and it's importance ?
What is Data analytics and it's importance ?
 
Internet & it's concepts
Internet & it's conceptsInternet & it's concepts
Internet & it's concepts
 
Types of grammer - TOC
Types of grammer - TOCTypes of grammer - TOC
Types of grammer - TOC
 
Loops in Python
Loops in PythonLoops in Python
Loops in Python
 
Successive Approximation ADC
Successive Approximation ADC Successive Approximation ADC
Successive Approximation ADC
 
Food chain
Food chainFood chain
Food chain
 
Edge computing
Edge computingEdge computing
Edge computing
 
Sets and its types-
 Sets and its types- Sets and its types-
Sets and its types-
 

Recently uploaded

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

JavaScript : A trending scripting language

  • 1. JavaScript “A simple way to get more.” Abhay Dhupar abhaydhupar123@gmail.com
  • 2. What is JavaScript ? • JavaScript is one of the most popular and widely used programming language in the world right now. • It’s growing faster than other programming languages and big companies like Netflix, Walmart and Paypal build their entire applications around JavaScript. • • US offers 75000 dollars per annum to JavaScript developers on an average. • You can work as a - Front-end Developer Back-end Developer Full-stack Developer
  • 3. What can you do with JavaScript ? • For a long time, JavaScript was only used in browsers to build interactive web pages. • Some developers referred to JavaScript as a toy language, but those days are gone because of huge community support and investments like large companies like facebook and google. • These days you can build - Web / Mobile Apps Command-line Tools Real-time Networking Apps Games
  • 4. Where does JavaScript code run ? • JavaScript was originally designed to run only in browsers. So every browser has JavaScript Engine that can run JavaScript code. In Chrome, this engine is v8. • In 2009, a very clever engineer called Ryan Dahl took the open source JavaScript Engine in Chrome and embedded it in a C++ program. He called that program Node. • So Node is a C++ program which includes Google’s v8 JavaScript Engine. Now with this, we can run our JavaScript code outside of a browser. So we can pass our JavaScript code to node for execution. So with JavaScript, we can build the backend for our web and our mobile applications. • Browser and Node provide a runtime environment for our JavaScript code.
  • 6. Editor and Other requirements • In order to write JavaScript code, you’ll need a code edit a code editor • Following are some of the commonly used - VS Code Sublime Atom
  • 7. Download Node • Technically, you don’t need Node on your machine for learning JavaScript, as you can do in browser as well. • But it is good to have Node in your machine to install third party libraries.
  • 8. JS through web browser <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <h1>Hello Abhay</h1> <script> console.log("Hello World") //Output(in your browser) inspect -> console </script> </body> </html>
  • 9. Separation of Concerns • Now while we can easily write JavaScript code in between the script element. In a real-world application, you have thousands or even million lines of code. • We don't want to write all that code inline here we want to extract and separate our JavaScript code from our HTML code. • Let’s understand by a metaphor - Think of your house. In your bedroom, you have your bed and your clothes. • You don’t store your clothes in the kitchen. This is what we call separation of concerns. • We have the same principle in programming, so we want to separate HTML which is all about content from JavaScript which is all about behavior.
  • 11. JS through Node • Open your .js file location. • Open up cmd or terminal at same location. • Now write node file_name.js • Use Integrated terminal in VS Code.
  • 12. Variables • We use variables to store data temporarily. • Use var keyword to declare a variable. • There are issues with var, we can also use let • Ex - var my_name = 'Abhay'; console.log(my_name); Rules • It cannot be a reserved word. • It cannot be start with a number. • It cannot contain a space or hyphen (–). We can either use CamelNotation. • It is case sensitive.
  • 13. What type of value can we store ?
  • 14. JavaScript : A Dynamic Language
  • 15. Object • Object is a real world entity. • For example – instead of giving name, age of a person; we can create a person object. • Ex - let person = { name: 'Abhay', age: 30 }; // dot notation person.name = 'John'; // Bracket notation person['name'] = 'Mary'; console.log(person);
  • 16. Arrays • Array in JS is also a object. • Sometimes in your application, you need to deal with list of objects. • So to store that list of objects, we need arrays. • Since JS is dynamic so size and data type in array can change in run time. • Ex – list of product, list of students. let array = ['Abhay','CSE'] array[2] = 1 console.log(array) console.log(array.length) console.log(typeof(array));
  • 17. Functions • Functions are one of the fundamental building blocks in JS. • Functions are used to perform a task. • function keyword is used to declare a function. function greet(fname, lname) { console.log('Hello '+ fname + ' ' + lname) } greet('Abhay','Dhupar');