SlideShare a Scribd company logo
1 of 4
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.

More Related Content

Viewers also liked

Coding task new
Coding task newCoding task new
Coding task newMax Friel
 
CSMB Summer Orientation Newsletter 2014
CSMB Summer Orientation Newsletter 2014CSMB Summer Orientation Newsletter 2014
CSMB Summer Orientation Newsletter 2014Chip Clatto
 
Flipping the classroom power point
Flipping the classroom power pointFlipping the classroom power point
Flipping the classroom power pointT. Schmidt
 
Student showcase part two
Student showcase part twoStudent showcase part two
Student showcase part twoMax Friel
 
Edmodo Scavenger Hunt
Edmodo Scavenger HuntEdmodo Scavenger Hunt
Edmodo Scavenger HuntT. Schmidt
 
Plan 3 maya 3
Plan 3 maya 3Plan 3 maya 3
Plan 3 maya 3Max Friel
 
1 j tugas makalah pie kelompok 7
1 j tugas makalah pie kelompok 71 j tugas makalah pie kelompok 7
1 j tugas makalah pie kelompok 7Mutiara Marganita
 

Viewers also liked (12)

Loops
LoopsLoops
Loops
 
Coding task new
Coding task newCoding task new
Coding task new
 
Lesson one
Lesson oneLesson one
Lesson one
 
Project 1
Project 1Project 1
Project 1
 
CSMB Summer Orientation Newsletter 2014
CSMB Summer Orientation Newsletter 2014CSMB Summer Orientation Newsletter 2014
CSMB Summer Orientation Newsletter 2014
 
Flipping the classroom power point
Flipping the classroom power pointFlipping the classroom power point
Flipping the classroom power point
 
Kpp se jakrta
Kpp se jakrtaKpp se jakrta
Kpp se jakrta
 
Student showcase part two
Student showcase part twoStudent showcase part two
Student showcase part two
 
Tugas revenue 2
Tugas revenue   2Tugas revenue   2
Tugas revenue 2
 
Edmodo Scavenger Hunt
Edmodo Scavenger HuntEdmodo Scavenger Hunt
Edmodo Scavenger Hunt
 
Plan 3 maya 3
Plan 3 maya 3Plan 3 maya 3
Plan 3 maya 3
 
1 j tugas makalah pie kelompok 7
1 j tugas makalah pie kelompok 71 j tugas makalah pie kelompok 7
1 j tugas makalah pie kelompok 7
 

Similar to Lesson 4 maya 3

Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basicsrobertbenard
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basicsrobertbenard
 
Java script basics
Java script basicsJava script basics
Java script basicsJohn Smith
 
Regular expressions
Regular expressionsRegular expressions
Regular expressionsRaghu nath
 
Coding Best Practices
Coding Best PracticesCoding Best Practices
Coding Best Practicesmh_azad
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA scriptumardanjumamaiwada
 
Javascript sivasoft
Javascript sivasoftJavascript sivasoft
Javascript sivasoftch samaram
 
N E T Coding Best Practices
N E T  Coding  Best  PracticesN E T  Coding  Best  Practices
N E T Coding Best PracticesAbhishek Desai
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentationAdhoura 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 JavascriptBinu 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.docxDIPESH30
 
PHP MATERIAL
PHP MATERIALPHP MATERIAL
PHP MATERIALzatax
 
Python comments and variables.pptx
Python comments and variables.pptxPython comments and variables.pptx
Python comments and variables.pptxadityakumawat625
 

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
 
Advanced VB: Review of the basics
Advanced VB: Review of the basicsAdvanced VB: Review of the basics
Advanced VB: Review of the basics
 
Java script basics
Java script basicsJava script basics
Java script basics
 
Php
PhpPhp
Php
 
Introduction to Java Scripting
Introduction to Java ScriptingIntroduction to Java Scripting
Introduction to Java Scripting
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Coding Best Practices
Coding Best PracticesCoding Best Practices
Coding Best Practices
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
 
Javascript sivasoft
Javascript sivasoftJavascript sivasoft
Javascript sivasoft
 
N E T Coding Best Practices
N E T  Coding  Best  PracticesN E T  Coding  Best  Practices
N E T Coding Best Practices
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
 
Web programming
Web programmingWeb programming
Web programming
 
07 java variables
07   java variables07   java variables
07 java variables
 
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
 
Strings
StringsStrings
Strings
 
Java Basics 1.pptx
Java Basics 1.pptxJava Basics 1.pptx
Java Basics 1.pptx
 
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
 
PHP MATERIAL
PHP MATERIALPHP MATERIAL
PHP MATERIAL
 
Python comments and variables.pptx
Python comments and variables.pptxPython comments and variables.pptx
Python comments and variables.pptx
 
Lect35 javascript
Lect35 javascriptLect35 javascript
Lect35 javascript
 

More from Max Friel

Practice programs
Practice programsPractice programs
Practice programsMax Friel
 
If conditions
If conditionsIf conditions
If conditionsMax Friel
 
Keywords used in javascript
Keywords used in javascriptKeywords used in javascript
Keywords used in javascriptMax Friel
 
Developing html skills 1
Developing html skills 1Developing html skills 1
Developing html skills 1Max Friel
 
Matching game
Matching gameMatching game
Matching gameMax Friel
 
activity flowcharts
activity flowchartsactivity flowcharts
activity flowchartsMax Friel
 
Summer course
Summer courseSummer course
Summer courseMax Friel
 
Group web design
Group web designGroup web design
Group web designMax Friel
 
Tourism in bangkok
Tourism in bangkokTourism in bangkok
Tourism in bangkokMax Friel
 
Errors in coding
Errors in codingErrors in coding
Errors in codingMax Friel
 

More from Max Friel (20)

Assum 4
Assum 4Assum 4
Assum 4
 
Assum 3
Assum 3Assum 3
Assum 3
 
Tourism
TourismTourism
Tourism
 
Practice programs
Practice programsPractice programs
Practice programs
 
Debugging
DebuggingDebugging
Debugging
 
Loops
LoopsLoops
Loops
 
If conditions
If conditionsIf conditions
If conditions
 
Keywords used in javascript
Keywords used in javascriptKeywords used in javascript
Keywords used in javascript
 
Variables
VariablesVariables
Variables
 
Basics
BasicsBasics
Basics
 
Developing html skills 1
Developing html skills 1Developing html skills 1
Developing html skills 1
 
Matching game
Matching gameMatching game
Matching game
 
activity flowcharts
activity flowchartsactivity flowcharts
activity flowcharts
 
Summer course
Summer courseSummer course
Summer course
 
Law
LawLaw
Law
 
Id
IdId
Id
 
Group web design
Group web designGroup web design
Group web design
 
Untitled 1
Untitled 1Untitled 1
Untitled 1
 
Tourism in bangkok
Tourism in bangkokTourism in bangkok
Tourism in bangkok
 
Errors in coding
Errors in codingErrors in coding
Errors in coding
 

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.