SlideShare a Scribd company logo
Topic
JavaScript
Group Member:
• Hamza Khan
• Mohammad Sajid
• Abdul Wahab
What can we do with Java Script
•Make webpage interactive
•Slider
•Image Galleries
•Form Validation
•Game Development
Java Script tag
• <script type=“text/Java script”></script>
How To Generate Message
Alert(“Hello world”);
Document.write Function in javascript
written on web page
• Document.write();
Show on web page
Document.write(“Hello world”);
Document.write Function in javascript
• Heading on webpage by javaScript
Document.write(“<h1>Hello</h1>”)
Types in java Script
1-String
2-Number
3-Boolean
4-Array
5-Object
Variable in java Script
• Variable are used to hold or store data
How to take data type in java script
Var name=“Ali Bhai”;
Alert(name);
Alert(typeof name);
Variable in java Script(cont)
Var num=25;
Alert(num);
Alert(typeof num);
Var Hk=“null”;
Alert(Hk);
(typeof object);
If-else Statement in javaScript
Syntax:
If(Condition){
//execute if block
}
Else{
//execute else block
}
If-else Statement in javaScript(con)
Var a=10;
Var b=11;
If(a==b)
{
Alert(“values are equal”);
}
Else
{
Alert(“Values are not equal”);
}
Functions in javascript
• Function eliminates the need of writing the
same code again and again.
Function welcome(){
Alert(“welcome to College”);
}
Welcome();
Welcome();
Airthmetic operations in JavaScript
• Addition +
• Subtraction –
• Multiplication *
• Division /
• (Division Reminder)%
• Increment ++
• Decrement --
Addition program in javaScript
Var add = 10 + 15;
document.write(add);
Here,
Operand=10 and 15
Operator= + sign
Subtraction program in javaScript
Var sub = 10 - 5;
document.write(sub);
Here,
Operand=10 and 15
Operator= - sign
Multiplication program in
javaScript
Var mul = 5 * 5;
document.write(mul);
Here,
Operand=5 and 5
Operator= * sign
Division program in javaScript
Var div = 5/5;
document.write(div);
Here,
Operand=5 and 5
Operator= / sign
Remainder program in javaScript
Var rem = 5%5;
document.write(rem);
Here,
Operand=5 and 5
Operator= % sign
Operator order of Precedence in javaScript
Var rem = 5+5*10;
document.write(rem);
First precedence Multiplication and
Division
Answer=55
Operator order of Precedence in
javaScript(Cont)
Var rem = (5+5)*10;
document.write(rem);
First Highest precedence is bracket
then Multiplication and Division
Answer=100
Increment and decrement operator in
javascript
Var Ans=10;
Ans++;
document.write(Ans);
Var Ans=11;
Ans--;
document.write(Ans);
Comparison operator in javascript
• ==(equal to)
• ===(equal value and type)
• !=(not equal)
• > greater than
• < Less than
• >= (greater than or equal to)
• < =(Less than or equal to)
Comparison operator in javascript(cont)
Var a=10, b=10
If(a==b){
document.write(“both values are
same”);
}
Ans=both values are same
Comparison operator in javascript(cont)
Var a=10, b=“10”
If(a===b){
document.write(“both values are same”);
}
Else{
document.write(“both values not are
same”);
}
Ans=not same
// because triple equal check values and
data type also
Comparison operator in javascript(cont)
Var a=10, b=5
If(a!=b){
document.write(“both values are not equal”);
}
Comparison operator in javascript(cont)
Var a=10, b=5
If(a>b){
document.write(“a greater than b”);
}
Comparison operator in javascript(cont)
Var a=10, b=5
If(a<b){
document.write(“a Less than b”);
}
Comparison operator in javascript(cont)
Var age=18
If(age >=18)
{
document.write(“you are eligible”);
}
Else{
Alert(“not Eligible”);
}
Ans=eligible
Math funcitons in javaScript
• Math.round();
• Math.sqrt();
• Math.power();
• Math.min();
• Math.max();
• Math.random();
• Math.floor(math.random() * 1000);
Loop in JavaScript
• For Loop
• While Loop
• Do while Loop
For loop in JavaScript
Syntax;
for(initialization; condition; increment/decriment )
E.g:
For(var i=1; i<6; i++)
{ document.write( “hello” + I + “ <br/ >” )
}
While Loop in javaScript
E.g:
var i=1;
While( i < 6 )
{ document.write( “hello”+ I + “ <br/ >” )
i++;
}
Do While loop in javaScript
E.g:
Var i=1;
do
{ document.write{“hello”+i+”<br>”}
i++;
}
While(i<6);
Array
Arrays
Data structures of related items
Each element has a position number
Dynamic
Size of an array in JavaScript can be changed
(increased) AFTER it is created
Arrays in JavaScript
• Each element referenced by a number
Start at “zeroth element”: 10 element array
has elements: 0,1,2 ,..,8,9
Subscript or index
• Accessing a specific element
Name of array
Brackets
Number of element
• Arrays know their length
length property
c[ 6 ]
-45
6
0
72
1543
-89
0
62
-3
1
6453
78
Name of array c[ 0 ]
c[ 1 ]
c[ 2 ]
c[ 3 ]
c[ 11 ]
c[ 10 ]
c[ 9 ]
c[ 8 ]
c[ 7 ]
c[ 5 ]
c[ 4 ]
Position number (index
or subscript) of the
element within array c
Fig. 11.1 A 12-element array.
Declaring and Allocating Arrays
• Arrays in memory
– Objects
– Operator new
• Allocates memory for objects
• Dynamic memory allocation operator
var c;  array declaration
c = new Array( 12 );  memory allocation
Using Arrays
• Arrays can grow dynamically
– Allocate more space as more items are added
than originally planned for
• Array elements must be initialized explicitly
– Default value is “undefined”
– for loops convenient fro initialization
– Referring to uninitialized elements or elements
outside array bounds is an error
Examples Using Arrays
• for…in statement
– Perform an action for each element in an array
– Iterates over array elements
• Assigns each element to specified variable one at a
time
– Ignores non-existent elements
Multidimensional Arrays
• Two-dimensional arrays analogous to tables
– Rows and columns
• Specify row first, then column
– Two subscripts
Multidimensional Arrays
a[ 1 ][ 0 ] a[ 1 ][ 1 ] a[ 1 ][ 2 ] a[ 1 ][ 3 ]
Row 0
Row 1
Row 2
Column 0 Column 1 Column 2 Column 3
Row subscript (or index)
Array name
Column subscript (or index)
a[ 0 ][ 0 ] a[ 0 ][ 1 ] a[ 0 ][ 2 ] a[ 0 ][ 3 ]
a[ 2 ][ 0 ] a[ 2 ][ 1 ] a[ 2 ][ 2 ] a[ 2 ][ 3 ]
Two-dimensional array with three rows and four columns.
JavaScript / Web Engineering / Web Development / html + css + js/presentation

More Related Content

What's hot

laravel.pptx
laravel.pptxlaravel.pptx
laravel.pptx
asif290119
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
Chirag vasava
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
Bishrul Haq
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
Bedis ElAchèche
 
JavaScript - Chapter 5 - Operators
 JavaScript - Chapter 5 - Operators JavaScript - Chapter 5 - Operators
JavaScript - Chapter 5 - Operators
WebStackAcademy
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
Vibrant Technologies & Computers
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Arun Sharma
 
Database language
Database languageDatabase language
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
sontumax
 
Relational model
Relational modelRelational model
Relational model
Dabbal Singh Mahara
 
Java Data Types
Java Data TypesJava Data Types
Java Data Types
Spotle.ai
 
PHP variables
PHP  variablesPHP  variables
PHP variables
Siddique Ibrahim
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
Taha Malampatti
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
Nishant Munjal
 
Document Object Model (DOM)
Document Object Model (DOM)Document Object Model (DOM)
Document Object Model (DOM)
GOPAL BASAK
 

What's hot (20)

Js ppt
Js pptJs ppt
Js ppt
 
laravel.pptx
laravel.pptxlaravel.pptx
laravel.pptx
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
 
JavaScript - Chapter 5 - Operators
 JavaScript - Chapter 5 - Operators JavaScript - Chapter 5 - Operators
JavaScript - Chapter 5 - Operators
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Database language
Database languageDatabase language
Database language
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Lesson 5 php operators
Lesson 5   php operatorsLesson 5   php operators
Lesson 5 php operators
 
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) ModelingEnhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
 
Php introduction
Php introductionPhp introduction
Php introduction
 
Relational model
Relational modelRelational model
Relational model
 
Java Data Types
Java Data TypesJava Data Types
Java Data Types
 
PHP variables
PHP  variablesPHP  variables
PHP variables
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Document Object Model (DOM)
Document Object Model (DOM)Document Object Model (DOM)
Document Object Model (DOM)
 

Similar to JavaScript / Web Engineering / Web Development / html + css + js/presentation

Java script advance-auroskills (2)
Java script advance-auroskills (2)Java script advance-auroskills (2)
Java script advance-auroskills (2)
BoneyGawande
 
Java script basics
Java script basicsJava script basics
Java script basics
Shrivardhan Limbkar
 
Java script.pptx v
Java script.pptx                                     vJava script.pptx                                     v
Java script.pptx v
22x026
 
Java Script
Java ScriptJava Script
Java Script
Sarvan15
 
Java Script
Java ScriptJava Script
Java Script
Sarvan15
 
Javascript
JavascriptJavascript
JavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfJavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdf
katarichallenge
 
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPTHSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
AAFREEN SHAIKH
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
Priya Goyal
 
JavaScript_III.pptx
JavaScript_III.pptxJavaScript_III.pptx
JavaScript_III.pptx
rashmiisrani1
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypesVarun C M
 
JavaScript Basics - GameCraft Training
JavaScript Basics - GameCraft TrainingJavaScript Basics - GameCraft Training
JavaScript Basics - GameCraft Training
Radoslav Georgiev
 
JavaScript(Es5) Interview Questions & Answers
JavaScript(Es5)  Interview Questions & AnswersJavaScript(Es5)  Interview Questions & Answers
JavaScript(Es5) Interview Questions & Answers
Ratnala Charan kumar
 
Client sidescripting javascript
Client sidescripting javascriptClient sidescripting javascript
Client sidescripting javascript
Selvin Josy Bai Somu
 
Ajax and JavaScript Bootcamp
Ajax and JavaScript BootcampAjax and JavaScript Bootcamp
Ajax and JavaScript Bootcamp
AndreCharland
 
Javascript
JavascriptJavascript
Javascript
Prashant Kumar
 
"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues"Javascript" por Tiago Rodrigues
An introduction to javascript
An introduction to javascriptAn introduction to javascript
An introduction to javascript
MD Sayem Ahmed
 

Similar to JavaScript / Web Engineering / Web Development / html + css + js/presentation (20)

Java script advance-auroskills (2)
Java script advance-auroskills (2)Java script advance-auroskills (2)
Java script advance-auroskills (2)
 
jQuery Objects
jQuery ObjectsjQuery Objects
jQuery Objects
 
Java script basics
Java script basicsJava script basics
Java script basics
 
Java script.pptx v
Java script.pptx                                     vJava script.pptx                                     v
Java script.pptx v
 
Java Script
Java ScriptJava Script
Java Script
 
Java Script
Java ScriptJava Script
Java Script
 
Javascript
JavascriptJavascript
Javascript
 
JavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfJavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdf
 
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPTHSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
HSC INFORMATION TECHNOLOGY CHAPTER 3 ADVANCED JAVASCRIPT
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
 
JavaScript_III.pptx
JavaScript_III.pptxJavaScript_III.pptx
JavaScript_III.pptx
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
JavaScript Basics - GameCraft Training
JavaScript Basics - GameCraft TrainingJavaScript Basics - GameCraft Training
JavaScript Basics - GameCraft Training
 
JavaScript(Es5) Interview Questions & Answers
JavaScript(Es5)  Interview Questions & AnswersJavaScript(Es5)  Interview Questions & Answers
JavaScript(Es5) Interview Questions & Answers
 
Client sidescripting javascript
Client sidescripting javascriptClient sidescripting javascript
Client sidescripting javascript
 
Ajax and JavaScript Bootcamp
Ajax and JavaScript BootcampAjax and JavaScript Bootcamp
Ajax and JavaScript Bootcamp
 
Javascript
JavascriptJavascript
Javascript
 
Java script
Java scriptJava script
Java script
 
"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues
 
An introduction to javascript
An introduction to javascriptAn introduction to javascript
An introduction to javascript
 

More from M Sajid R

Binary Search Tree (BST)
Binary Search Tree (BST)Binary Search Tree (BST)
Binary Search Tree (BST)
M Sajid R
 
Transport layer
Transport layerTransport layer
Transport layer
M Sajid R
 
Novartis
NovartisNovartis
Novartis
M Sajid R
 
Query o
Query oQuery o
Query o
M Sajid R
 
Network And Topology
Network And Topology Network And Topology
Network And Topology
M Sajid R
 
Toyota
ToyotaToyota
Toyota
M Sajid R
 

More from M Sajid R (6)

Binary Search Tree (BST)
Binary Search Tree (BST)Binary Search Tree (BST)
Binary Search Tree (BST)
 
Transport layer
Transport layerTransport layer
Transport layer
 
Novartis
NovartisNovartis
Novartis
 
Query o
Query oQuery o
Query o
 
Network And Topology
Network And Topology Network And Topology
Network And Topology
 
Toyota
ToyotaToyota
Toyota
 

Recently uploaded

Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 

Recently uploaded (20)

Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 

JavaScript / Web Engineering / Web Development / html + css + js/presentation

  • 1.
  • 2. Topic JavaScript Group Member: • Hamza Khan • Mohammad Sajid • Abdul Wahab
  • 3. What can we do with Java Script •Make webpage interactive •Slider •Image Galleries •Form Validation •Game Development
  • 4. Java Script tag • <script type=“text/Java script”></script>
  • 5. How To Generate Message Alert(“Hello world”);
  • 6. Document.write Function in javascript written on web page • Document.write(); Show on web page Document.write(“Hello world”);
  • 7. Document.write Function in javascript • Heading on webpage by javaScript Document.write(“<h1>Hello</h1>”)
  • 8. Types in java Script 1-String 2-Number 3-Boolean 4-Array 5-Object
  • 9. Variable in java Script • Variable are used to hold or store data How to take data type in java script Var name=“Ali Bhai”; Alert(name); Alert(typeof name);
  • 10. Variable in java Script(cont) Var num=25; Alert(num); Alert(typeof num); Var Hk=“null”; Alert(Hk); (typeof object);
  • 11. If-else Statement in javaScript Syntax: If(Condition){ //execute if block } Else{ //execute else block }
  • 12. If-else Statement in javaScript(con) Var a=10; Var b=11; If(a==b) { Alert(“values are equal”); } Else { Alert(“Values are not equal”); }
  • 13. Functions in javascript • Function eliminates the need of writing the same code again and again. Function welcome(){ Alert(“welcome to College”); } Welcome(); Welcome();
  • 14. Airthmetic operations in JavaScript • Addition + • Subtraction – • Multiplication * • Division / • (Division Reminder)% • Increment ++ • Decrement --
  • 15. Addition program in javaScript Var add = 10 + 15; document.write(add); Here, Operand=10 and 15 Operator= + sign
  • 16. Subtraction program in javaScript Var sub = 10 - 5; document.write(sub); Here, Operand=10 and 15 Operator= - sign
  • 17. Multiplication program in javaScript Var mul = 5 * 5; document.write(mul); Here, Operand=5 and 5 Operator= * sign
  • 18. Division program in javaScript Var div = 5/5; document.write(div); Here, Operand=5 and 5 Operator= / sign
  • 19. Remainder program in javaScript Var rem = 5%5; document.write(rem); Here, Operand=5 and 5 Operator= % sign
  • 20. Operator order of Precedence in javaScript Var rem = 5+5*10; document.write(rem); First precedence Multiplication and Division Answer=55
  • 21. Operator order of Precedence in javaScript(Cont) Var rem = (5+5)*10; document.write(rem); First Highest precedence is bracket then Multiplication and Division Answer=100
  • 22. Increment and decrement operator in javascript Var Ans=10; Ans++; document.write(Ans); Var Ans=11; Ans--; document.write(Ans);
  • 23. Comparison operator in javascript • ==(equal to) • ===(equal value and type) • !=(not equal) • > greater than • < Less than • >= (greater than or equal to) • < =(Less than or equal to)
  • 24. Comparison operator in javascript(cont) Var a=10, b=10 If(a==b){ document.write(“both values are same”); } Ans=both values are same
  • 25. Comparison operator in javascript(cont) Var a=10, b=“10” If(a===b){ document.write(“both values are same”); } Else{ document.write(“both values not are same”); } Ans=not same // because triple equal check values and data type also
  • 26. Comparison operator in javascript(cont) Var a=10, b=5 If(a!=b){ document.write(“both values are not equal”); }
  • 27. Comparison operator in javascript(cont) Var a=10, b=5 If(a>b){ document.write(“a greater than b”); }
  • 28. Comparison operator in javascript(cont) Var a=10, b=5 If(a<b){ document.write(“a Less than b”); }
  • 29. Comparison operator in javascript(cont) Var age=18 If(age >=18) { document.write(“you are eligible”); } Else{ Alert(“not Eligible”); } Ans=eligible
  • 30. Math funcitons in javaScript • Math.round(); • Math.sqrt(); • Math.power(); • Math.min(); • Math.max(); • Math.random(); • Math.floor(math.random() * 1000);
  • 31. Loop in JavaScript • For Loop • While Loop • Do while Loop
  • 32. For loop in JavaScript Syntax; for(initialization; condition; increment/decriment ) E.g: For(var i=1; i<6; i++) { document.write( “hello” + I + “ <br/ >” ) }
  • 33. While Loop in javaScript E.g: var i=1; While( i < 6 ) { document.write( “hello”+ I + “ <br/ >” ) i++; }
  • 34. Do While loop in javaScript E.g: Var i=1; do { document.write{“hello”+i+”<br>”} i++; } While(i<6);
  • 35. Array Arrays Data structures of related items Each element has a position number Dynamic Size of an array in JavaScript can be changed (increased) AFTER it is created
  • 36. Arrays in JavaScript • Each element referenced by a number Start at “zeroth element”: 10 element array has elements: 0,1,2 ,..,8,9 Subscript or index • Accessing a specific element Name of array Brackets Number of element • Arrays know their length length property
  • 37. c[ 6 ] -45 6 0 72 1543 -89 0 62 -3 1 6453 78 Name of array c[ 0 ] c[ 1 ] c[ 2 ] c[ 3 ] c[ 11 ] c[ 10 ] c[ 9 ] c[ 8 ] c[ 7 ] c[ 5 ] c[ 4 ] Position number (index or subscript) of the element within array c Fig. 11.1 A 12-element array.
  • 38. Declaring and Allocating Arrays • Arrays in memory – Objects – Operator new • Allocates memory for objects • Dynamic memory allocation operator var c;  array declaration c = new Array( 12 );  memory allocation
  • 39. Using Arrays • Arrays can grow dynamically – Allocate more space as more items are added than originally planned for • Array elements must be initialized explicitly – Default value is “undefined” – for loops convenient fro initialization – Referring to uninitialized elements or elements outside array bounds is an error
  • 40. Examples Using Arrays • for…in statement – Perform an action for each element in an array – Iterates over array elements • Assigns each element to specified variable one at a time – Ignores non-existent elements
  • 41. Multidimensional Arrays • Two-dimensional arrays analogous to tables – Rows and columns • Specify row first, then column – Two subscripts
  • 42. Multidimensional Arrays a[ 1 ][ 0 ] a[ 1 ][ 1 ] a[ 1 ][ 2 ] a[ 1 ][ 3 ] Row 0 Row 1 Row 2 Column 0 Column 1 Column 2 Column 3 Row subscript (or index) Array name Column subscript (or index) a[ 0 ][ 0 ] a[ 0 ][ 1 ] a[ 0 ][ 2 ] a[ 0 ][ 3 ] a[ 2 ][ 0 ] a[ 2 ][ 1 ] a[ 2 ][ 2 ] a[ 2 ][ 3 ] Two-dimensional array with three rows and four columns.