際際滷

際際滷Share a Scribd company logo
Working with JavaScript

The Javascript code is placed between <body> and
</body> tags in HTML.

The start of javascript code begins as <script
type=text/javascript> and </script> tags.

You would find a semicolon at the end of a
javascript statement. (;)

A comment phrase begins with a //. Phrases can
be introduced to make the program more readable.
This would not be executed by computer
Variables
Variables can be compared to small boxes with names.
If you were to store 5 pair of shoes, you might have a box
for each pair. On each box you would write what is in it.

The boxes would be your variables.
(Places to store things.)

The name on the boxes would be the variable names.
( The ones you'd use when referring to each of the boxes.)

And finally the shoes, would be the content of the
variables.
(What is stored in the boxes.)
Rules of Variables
We must follow a set of rules for creating a
variable in JavaScript such as-

Names are case sensitive. For example
LENGTH is not the same as length.

Variable name should begin with a letter or
underscore (_). For example 3number is a
wrong variable name.
Rules of Variables

Keywords (special words that are used for
specific purposes by javascript, should not
be used as variable names.

It is recommended to use meaningful
variable names. For example first name is
Firstname.
Mathematical Operators
Keywords
Keywords

More Related Content

Similar to Lesson 4 maya 3 (20)

Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
robertbenard
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
robertbenard
Java script basics
Java script basicsJava script basics
Java script basics
John Smith
Php
PhpPhp
Php
shakubar sathik
Introduction to Java Scripting
Introduction to Java ScriptingIntroduction to Java Scripting
Introduction to Java Scripting
fantasticdigitaltools
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Raghu nath
Coding Best Practices
Coding Best PracticesCoding Best Practices
Coding Best Practices
mh_azad
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
umardanjumamaiwada
Javascript sivasoft
Javascript sivasoftJavascript sivasoft
Javascript sivasoft
ch samaram
N E T Coding Best Practices
N E T  Coding  Best  PracticesN E T  Coding  Best  Practices
N E T Coding Best Practices
Abhishek Desai
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
Adhoura Academy
Web programming
Web programmingWeb programming
Web programming
Leo Mark Villar
07 java variables
07   java variables07   java variables
07 java variables
Zeeshan-Shaikh
Cordova training : Day 3 - Introduction to Javascript
Cordova training : Day 3 - Introduction to JavascriptCordova training : Day 3 - Introduction to Javascript
Cordova training : Day 3 - Introduction to Javascript
Binu Paul
Strings
StringsStrings
Strings
Max Friel
Java Basics 1.pptx
Java Basics 1.pptxJava Basics 1.pptx
Java Basics 1.pptx
TouseeqHaider11
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxLabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
DIPESH30
PHP MATERIAL
PHP MATERIALPHP MATERIAL
PHP MATERIAL
zatax
Python油comments and variables.pptx
Python油comments and variables.pptxPython油comments and variables.pptx
Python油comments and variables.pptx
adityakumawat625
Lect35 javascript
Lect35 javascriptLect35 javascript
Lect35 javascript
劉凌 留留亮留虜略旅凌
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
robertbenard
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
robertbenard
Java script basics
Java script basicsJava script basics
Java script basics
John Smith
Regular expressions
Regular expressionsRegular expressions
Regular expressions
Raghu nath
Coding Best Practices
Coding Best PracticesCoding Best Practices
Coding Best Practices
mh_azad
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
umardanjumamaiwada
Javascript sivasoft
Javascript sivasoftJavascript sivasoft
Javascript sivasoft
ch samaram
N E T Coding Best Practices
N E T  Coding  Best  PracticesN E T  Coding  Best  Practices
N E T Coding Best Practices
Abhishek Desai
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
Adhoura Academy
Cordova training : Day 3 - Introduction to Javascript
Cordova training : Day 3 - Introduction to JavascriptCordova training : Day 3 - Introduction to Javascript
Cordova training : Day 3 - Introduction to Javascript
Binu Paul
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxLabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
DIPESH30
PHP MATERIAL
PHP MATERIALPHP MATERIAL
PHP MATERIAL
zatax
Python油comments and variables.pptx
Python油comments and variables.pptxPython油comments and variables.pptx
Python油comments and variables.pptx
adityakumawat625

More from Max Friel (20)

Assum 4
Assum 4Assum 4
Assum 4
Max Friel
Assum 3
Assum 3Assum 3
Assum 3
Max Friel
Tourism
TourismTourism
Tourism
Max Friel
Practice programs
Practice programsPractice programs
Practice programs
Max Friel
Project 1
Project 1Project 1
Project 1
Max Friel
Practice and debugging
Practice and debuggingPractice and debugging
Practice and debugging
Max Friel
Debugging
DebuggingDebugging
Debugging
Max Friel
Loops
LoopsLoops
Loops
Max Friel
Loops
LoopsLoops
Loops
Max Friel
If conditions
If conditionsIf conditions
If conditions
Max Friel
Keywords used in javascript
Keywords used in javascriptKeywords used in javascript
Keywords used in javascript
Max Friel
Variables
VariablesVariables
Variables
Max Friel
Basics
BasicsBasics
Basics
Max Friel
Developing html skills 1
Developing html skills 1Developing html skills 1
Developing html skills 1
Max Friel
Matching game
Matching gameMatching game
Matching game
Max Friel
activity flowcharts
activity flowchartsactivity flowcharts
activity flowcharts
Max Friel
Lesson one
Lesson oneLesson one
Lesson one
Max Friel
Summer course
Summer courseSummer course
Summer course
Max Friel
Law
LawLaw
Law
Max Friel
Phishing
PhishingPhishing
Phishing
Max Friel
Practice programs
Practice programsPractice programs
Practice programs
Max Friel
Project 1
Project 1Project 1
Project 1
Max Friel
Practice and debugging
Practice and debuggingPractice and debugging
Practice and debugging
Max Friel
Debugging
DebuggingDebugging
Debugging
Max Friel
If conditions
If conditionsIf conditions
If conditions
Max Friel
Keywords used in javascript
Keywords used in javascriptKeywords used in javascript
Keywords used in javascript
Max Friel
Variables
VariablesVariables
Variables
Max Friel
Developing html skills 1
Developing html skills 1Developing html skills 1
Developing html skills 1
Max Friel
Matching game
Matching gameMatching game
Matching game
Max Friel
activity flowcharts
activity flowchartsactivity flowcharts
activity flowcharts
Max Friel
Lesson one
Lesson oneLesson one
Lesson one
Max Friel
Summer course
Summer courseSummer course
Summer course
Max Friel

Recently uploaded (20)

AI Trends and Fun Demos Sothebys Rehoboth Presentation
AI Trends and Fun Demos  Sothebys Rehoboth PresentationAI Trends and Fun Demos  Sothebys Rehoboth Presentation
AI Trends and Fun Demos Sothebys Rehoboth Presentation
Ethan Holland
Not a Kubernetes fan? The state of PaaS in 2025
Not a Kubernetes fan? The state of PaaS in 2025Not a Kubernetes fan? The state of PaaS in 2025
Not a Kubernetes fan? The state of PaaS in 2025
Anthony Dahanne
SB7 Mobile Ltd: Simplified & Secure Services
SB7 Mobile Ltd: Simplified & Secure ServicesSB7 Mobile Ltd: Simplified & Secure Services
SB7 Mobile Ltd: Simplified & Secure Services
Reuben Jasper
"DevOps culture and digital transformation process of Temabit Fozzy Group", O...
"DevOps culture and digital transformation process of Temabit Fozzy Group", O..."DevOps culture and digital transformation process of Temabit Fozzy Group", O...
"DevOps culture and digital transformation process of Temabit Fozzy Group", O...
Fwdays
Caching for Performance Masterclass: The In-Memory Datastore
Caching for Performance Masterclass: The In-Memory DatastoreCaching for Performance Masterclass: The In-Memory Datastore
Caching for Performance Masterclass: The In-Memory Datastore
ScyllaDB
Data-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second CountsData-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second Counts
Safe Software
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
Fwdays
Caching for Performance Masterclass: Caching at Scale
Caching for Performance Masterclass: Caching at ScaleCaching for Performance Masterclass: Caching at Scale
Caching for Performance Masterclass: Caching at Scale
ScyllaDB
TrustArc Webinar: State of State Privacy Laws
TrustArc Webinar: State of State Privacy LawsTrustArc Webinar: State of State Privacy Laws
TrustArc Webinar: State of State Privacy Laws
TrustArc
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIATHE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
Srivaanchi Nathan
UiPath Automation Developer Associate Training Series 2025 - Session 1
UiPath Automation Developer Associate Training Series 2025 - Session 1UiPath Automation Developer Associate Training Series 2025 - Session 1
UiPath Automation Developer Associate Training Series 2025 - Session 1
DianaGray10
"10 Pitfalls of a Platform Team", Yura Rochniak
"10 Pitfalls of a Platform Team", Yura Rochniak"10 Pitfalls of a Platform Team", Yura Rochniak
"10 Pitfalls of a Platform Team", Yura Rochniak
Fwdays
Salesforce Flow using development with Gen. AI
Salesforce Flow using development with Gen. AISalesforce Flow using development with Gen. AI
Salesforce Flow using development with Gen. AI
Jihun Jung
Cryptography Overview Presentation circa 2005
Cryptography Overview Presentation circa 2005Cryptography Overview Presentation circa 2005
Cryptography Overview Presentation circa 2005
Dan Houser
What is Blockchain and How Can Blockchain Consulting Help Businesses.pdf
What is Blockchain and How Can Blockchain Consulting Help Businesses.pdfWhat is Blockchain and How Can Blockchain Consulting Help Businesses.pdf
What is Blockchain and How Can Blockchain Consulting Help Businesses.pdf
Yodaplus Technologies Private Limited
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
Fwdays
What's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and HighlightsWhat's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and Highlights
ThousandEyes
NSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to KnowNSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to Know
Soulmaite
Benchmark Testing Demystified: Your Roadmap to Peak Performance
Benchmark Testing Demystified: Your Roadmap to Peak PerformanceBenchmark Testing Demystified: Your Roadmap to Peak Performance
Benchmark Testing Demystified: Your Roadmap to Peak Performance
Shubham Joshi
Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3
Margaret Maynard-Reid
AI Trends and Fun Demos Sothebys Rehoboth Presentation
AI Trends and Fun Demos  Sothebys Rehoboth PresentationAI Trends and Fun Demos  Sothebys Rehoboth Presentation
AI Trends and Fun Demos Sothebys Rehoboth Presentation
Ethan Holland
Not a Kubernetes fan? The state of PaaS in 2025
Not a Kubernetes fan? The state of PaaS in 2025Not a Kubernetes fan? The state of PaaS in 2025
Not a Kubernetes fan? The state of PaaS in 2025
Anthony Dahanne
SB7 Mobile Ltd: Simplified & Secure Services
SB7 Mobile Ltd: Simplified & Secure ServicesSB7 Mobile Ltd: Simplified & Secure Services
SB7 Mobile Ltd: Simplified & Secure Services
Reuben Jasper
"DevOps culture and digital transformation process of Temabit Fozzy Group", O...
"DevOps culture and digital transformation process of Temabit Fozzy Group", O..."DevOps culture and digital transformation process of Temabit Fozzy Group", O...
"DevOps culture and digital transformation process of Temabit Fozzy Group", O...
Fwdays
Caching for Performance Masterclass: The In-Memory Datastore
Caching for Performance Masterclass: The In-Memory DatastoreCaching for Performance Masterclass: The In-Memory Datastore
Caching for Performance Masterclass: The In-Memory Datastore
ScyllaDB
Data-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second CountsData-Driven Public Safety: Reliable Data When Every Second Counts
Data-Driven Public Safety: Reliable Data When Every Second Counts
Safe Software
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
"Turning Kubernetes into a full-fledged private cloud", Volodymyr Tsap
Fwdays
Caching for Performance Masterclass: Caching at Scale
Caching for Performance Masterclass: Caching at ScaleCaching for Performance Masterclass: Caching at Scale
Caching for Performance Masterclass: Caching at Scale
ScyllaDB
TrustArc Webinar: State of State Privacy Laws
TrustArc Webinar: State of State Privacy LawsTrustArc Webinar: State of State Privacy Laws
TrustArc Webinar: State of State Privacy Laws
TrustArc
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIATHE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
Srivaanchi Nathan
UiPath Automation Developer Associate Training Series 2025 - Session 1
UiPath Automation Developer Associate Training Series 2025 - Session 1UiPath Automation Developer Associate Training Series 2025 - Session 1
UiPath Automation Developer Associate Training Series 2025 - Session 1
DianaGray10
"10 Pitfalls of a Platform Team", Yura Rochniak
"10 Pitfalls of a Platform Team", Yura Rochniak"10 Pitfalls of a Platform Team", Yura Rochniak
"10 Pitfalls of a Platform Team", Yura Rochniak
Fwdays
Salesforce Flow using development with Gen. AI
Salesforce Flow using development with Gen. AISalesforce Flow using development with Gen. AI
Salesforce Flow using development with Gen. AI
Jihun Jung
Cryptography Overview Presentation circa 2005
Cryptography Overview Presentation circa 2005Cryptography Overview Presentation circa 2005
Cryptography Overview Presentation circa 2005
Dan Houser
What is Blockchain and How Can Blockchain Consulting Help Businesses.pdf
What is Blockchain and How Can Blockchain Consulting Help Businesses.pdfWhat is Blockchain and How Can Blockchain Consulting Help Businesses.pdf
What is Blockchain and How Can Blockchain Consulting Help Businesses.pdf
Yodaplus Technologies Private Limited
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
"Reality of Managing 100+ Managed RDS Postgres Databases", Mykyta Hlushak
Fwdays
What's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and HighlightsWhat's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and Highlights
ThousandEyes
NSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to KnowNSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to Know
Soulmaite
Benchmark Testing Demystified: Your Roadmap to Peak Performance
Benchmark Testing Demystified: Your Roadmap to Peak PerformanceBenchmark Testing Demystified: Your Roadmap to Peak Performance
Benchmark Testing Demystified: Your Roadmap to Peak Performance
Shubham Joshi
Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3
Margaret Maynard-Reid

Lesson 4 maya 3

  • 1. Working with JavaScript The Javascript code is placed between <body> and </body> tags in HTML. The start of javascript code begins as <script type=text/javascript> and </script> tags. You would find a semicolon at the end of a javascript statement. (;) A comment phrase begins with a //. Phrases can be introduced to make the program more readable. This would not be executed by computer
  • 2. Variables Variables can be compared to small boxes with names. If you were to store 5 pair of shoes, you might have a box for each pair. On each box you would write what is in it. The boxes would be your variables. (Places to store things.) The name on the boxes would be the variable names. ( The ones you'd use when referring to each of the boxes.) And finally the shoes, would be the content of the variables. (What is stored in the boxes.)
  • 3. Rules of Variables We must follow a set of rules for creating a variable in JavaScript such as- Names are case sensitive. For example LENGTH is not the same as length. Variable name should begin with a letter or underscore (_). For example 3number is a wrong variable name.
  • 4. Rules of Variables Keywords (special words that are used for specific purposes by javascript, should not be used as variable names. It is recommended to use meaningful variable names. For example first name is Firstname.