SlideShare a Scribd company logo
Outline
IS400: Development of Business Applications on the Internet
Fall 2004
Instructor: Dr. Boris Jukic
JavaScript: Arrays
Introduction
 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
 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
Outline
1 <?xml version = "1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5 <!-- Fig. 11.3: InitArray.html -->
6 <!-- Initializing an Array -->
7
8 <html xmlns = "http://www.w3.org/1999/xhtml">
9 <head>
10 <title>Initializing an Array</title>
11
12 <script type = "text/javascript">
13 <!--
14 // this function is called when the <body> element's
15 // onload event occurs
16 function initializeArrays()
17 {
18 var n1 = new Array( 5 ); // allocate 5-element Array
19 var n2 = new Array(); // allocate empty Array
20
21 // assign values to each element of Array n1
22 for ( var i = 0; i < n1.length; ++i )
23 n1[ i ] = i;
Array n1 has five elements.
The for loop initializes the elements in n1 to
their subscript numbers (0 to 4).
Array n2 is an empty array.
Outline
24
25 // create and initialize five-elements in Array n2
26 for ( i = 0; i < 5; ++i )
27 n2[ i ] = i;
28
29 outputArray( "Array n1 contains", n1 );
30 outputArray( "Array n2 contains", n2 );
31 }
32
33 // output "header" followed by a two-column table
34 // containing subscripts and elements of "theArray"
35 function outputArray( header, theArray )
36 {
37 document.writeln( "<h2>" + header + "</h2>" );
38 document.writeln( "<table border = "1" width =" +
39 ""100%">" );
40
41 document.writeln( "<thead><th width = "100"" +
42 "align = "left">Subscript</th>" +
43 "<th align = "left">Value</th></thead><tbody>" );
The for loop adds five elements to Array n2 and
initialize each element to its subscript number (0 to 4).
Each function displays the
contents of its respective Array
in an XHTML table.
The first time function ouputArray is called,
variable header gets the value of “Array n1
contains” and variable theArray gets the
value of n1.
The second time function ouputArray is
called, variable header gets the value of
“Array n2 contains” and variable
theArray gets the value of n2.
Outline
44
45 for ( var i = 0; i < theArray.length; i++ )
46 document.writeln( "<tr><td>" + i + "</td><td>" +
47 theArray[ i ] + "</td></tr>" );
48
49 document.writeln( "</tbody></table>" );
50 }
51 // -->
52 </script>
53
54 </head><body onload = "initializeArrays()"></body>
55 </html>
Examples Using Arrays
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
Outline
SumArray.html
(1 of 2)
1 <?xml version = "1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5 <!-- Fig. 11.5: SumArray.html -->
6 <!-- Summing Elements of an Array -->
7
8 <html xmlns = "http://www.w3.org/1999/xhtml">
9 <head>
10 <title>Sum the Elements of an Array</title>
11
12 <script type = "text/javascript">
13 <!--
14 function start()
15 {
16 var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
17 var total1 = 0, total2 = 0;
18
19 for ( var i = 0; i < theArray.length; i++ )
20 total1 += theArray[ i ];
21
22 document.writeln( "Total using subscripts: " + total1 );
23
The for loop sums the values contained in the 10-
element integer array called theArray.
Outline
SumArray.html
(2 of 2)
24 for ( var element in theArray )
25 total2 += theArray[ element ];
26
27 document.writeln( "<br />Total using for...in: " +
28 total2 );
29 }
30 // -->
31 </script>
32
33 </head><body onload = "start()"></body>
34 </html>
Variable element is assigned a subscript
in the range of 0 up to, but not including,
theArray.length.
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.
Multidimensional Arrays
 Declaring and initializing multidimensional
arrays
– Group by row in square brackets
– Treated as arrays of arrays
– Creating array b with one row of two elements
and a second row of three elements:
var b = [ [ 1, 2 ], [ 3, 4, 5 ] ];
Multidimensional Arrays
 Also possible to use new operator
– Create array b with two rows, first with five
columns and second with three:
var b;
b = new Array( 2 );
b[ 0 ] = new Array( 5 );
b[ 1 ] = new Array( 3 );
Outline
InitArray3.html
(1 of 2)
1 <?xml version = "1.0"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
5 <!-- Fig. 11.13: InitArray3.html -->
6 <!-- Initializing Multidimensional Arrays -->
7
8 <html xmlns = "http://www.w3.org/1999/xhtml">
9 <head>
10 <title>Initializing Multidimensional Arrays</title>
11
12 <script type = "text/javascript">
13 <!--
14 function start()
15 {
16 var array1 = [ [ 1, 2, 3 ], // first row
17 [ 4, 5, 6 ] ]; // second row
18 var array2 = [ [ 1, 2 ], // first row
19 [ 3 ], // second row
20 [ 4, 5, 6 ] ]; // third row
21
22 outputArray( "Values in array1 by row", array1 );
23 outputArray( "Values in array2 by row", array2 );
24 }
Array array1 provides six initializers in
two rows.
Array array2 provides six initializers in
three rows.
Function outputArray displays each array’s
elements in a Web page.
Outline
InitArray3.html
(2 of 2)
25
26 function outputArray( header, theArray )
27 {
28 document.writeln( "<h2>" + header + "</h2><tt>" );
29
30 for ( var i in theArray ) {
31
32 for ( var j in theArray[ i ] )
33 document.write( theArray[ i ][ j ] + " " );
34
35 document.writeln( "<br />" );
36 }
37
38 document.writeln( "</tt>" );
39 }
40 // -->
41 </script>
42
43 </head><body onload = "start()"></body>
44 </html>
Referencing the multidimensional
array theArray.
Multidimensional Arrays

More Related Content

Similar to Lecture no 9.ppt operating system semester four (20)

PPTX
Unit-2.Arrays and Strings.pptx.................
suchitrapoojari984
 
PPTX
JavaScript Arrays and its types .pptx
Ramakrishna Reddy Bijjam
 
PPTX
Arrays in C++
Kashif Nawab
 
PPT
Array 31.8.2020 updated
vrgokila
 
PPT
Topic20Arrays_Part2.ppt
adityavarte
 
PDF
Java script objects 1
H K
 
PPT
Fp201 unit4
rohassanie
 
PPT
Basics of Data structure using C describing basics concepts
shanthidl1
 
PPT
Arrays in c programing. practicals and .ppt
Carlos701746
 
PPTX
07+08slide.pptx
MURADSANJOUM
 
PPT
Chapter 6 arrays part-1
Synapseindiappsdevelopment
 
PPTX
Java script arrays
Frayosh Wadia
 
PPTX
Java script arrays
Frayosh Wadia
 
PPT
Queue Data Structure
Zidny Nafan
 
PPT
Queue Data Structure
Sriram Raj
 
PPTX
Java script advance-auroskills (2)
BoneyGawande
 
PDF
Class notes(week 4) on arrays and strings
Kuntal Bhowmick
 
PDF
02 arrays
Rajan Gautam
 
PPT
9780538745840 ppt ch06
Terry Yoast
 
PPTX
Array BPK 2
Riki Afriansyah
 
Unit-2.Arrays and Strings.pptx.................
suchitrapoojari984
 
JavaScript Arrays and its types .pptx
Ramakrishna Reddy Bijjam
 
Arrays in C++
Kashif Nawab
 
Array 31.8.2020 updated
vrgokila
 
Topic20Arrays_Part2.ppt
adityavarte
 
Java script objects 1
H K
 
Fp201 unit4
rohassanie
 
Basics of Data structure using C describing basics concepts
shanthidl1
 
Arrays in c programing. practicals and .ppt
Carlos701746
 
07+08slide.pptx
MURADSANJOUM
 
Chapter 6 arrays part-1
Synapseindiappsdevelopment
 
Java script arrays
Frayosh Wadia
 
Java script arrays
Frayosh Wadia
 
Queue Data Structure
Zidny Nafan
 
Queue Data Structure
Sriram Raj
 
Java script advance-auroskills (2)
BoneyGawande
 
Class notes(week 4) on arrays and strings
Kuntal Bhowmick
 
02 arrays
Rajan Gautam
 
9780538745840 ppt ch06
Terry Yoast
 
Array BPK 2
Riki Afriansyah
 

More from VaibhavBhagwat18 (8)

PPTX
Digital Techniques and Microporcssoor.pptx
VaibhavBhagwat18
 
PPT
software engineering chapte r one Btech
VaibhavBhagwat18
 
PPTX
Railway Management SystemIN DATABASE System
VaibhavBhagwat18
 
PPT
computer Networks Transport Layer .ppt
VaibhavBhagwat18
 
PPTX
Weather Application using Python using tkinter
VaibhavBhagwat18
 
PPTX
EEM CH 5.pptx
VaibhavBhagwat18
 
PPTX
OOP GRP2.pptx
VaibhavBhagwat18
 
PPTX
DCO MP.pptx
VaibhavBhagwat18
 
Digital Techniques and Microporcssoor.pptx
VaibhavBhagwat18
 
software engineering chapte r one Btech
VaibhavBhagwat18
 
Railway Management SystemIN DATABASE System
VaibhavBhagwat18
 
computer Networks Transport Layer .ppt
VaibhavBhagwat18
 
Weather Application using Python using tkinter
VaibhavBhagwat18
 
EEM CH 5.pptx
VaibhavBhagwat18
 
OOP GRP2.pptx
VaibhavBhagwat18
 
DCO MP.pptx
VaibhavBhagwat18
 
Ad

Recently uploaded (20)

PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
PPTX
Introduction to Basic Renewable Energy.pptx
examcoordinatormesu
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PPTX
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
Big Data and Data Science hype .pptx
SUNEEL37
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPT
Electrical Safety Presentation for Basics Learning
AliJaved79382
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
Introduction to Basic Renewable Energy.pptx
examcoordinatormesu
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Design Thinking basics for Engineers.pdf
CMR University
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
Big Data and Data Science hype .pptx
SUNEEL37
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Electrical Safety Presentation for Basics Learning
AliJaved79382
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Ad

Lecture no 9.ppt operating system semester four

  • 1. Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic JavaScript: Arrays
  • 2. Introduction  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
  • 3. Arrays  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
  • 4. 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.
  • 5. 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
  • 6. 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
  • 7. Outline 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 4 5 <!-- Fig. 11.3: InitArray.html --> 6 <!-- Initializing an Array --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Initializing an Array</title> 11 12 <script type = "text/javascript"> 13 <!-- 14 // this function is called when the <body> element's 15 // onload event occurs 16 function initializeArrays() 17 { 18 var n1 = new Array( 5 ); // allocate 5-element Array 19 var n2 = new Array(); // allocate empty Array 20 21 // assign values to each element of Array n1 22 for ( var i = 0; i < n1.length; ++i ) 23 n1[ i ] = i; Array n1 has five elements. The for loop initializes the elements in n1 to their subscript numbers (0 to 4). Array n2 is an empty array.
  • 8. Outline 24 25 // create and initialize five-elements in Array n2 26 for ( i = 0; i < 5; ++i ) 27 n2[ i ] = i; 28 29 outputArray( "Array n1 contains", n1 ); 30 outputArray( "Array n2 contains", n2 ); 31 } 32 33 // output "header" followed by a two-column table 34 // containing subscripts and elements of "theArray" 35 function outputArray( header, theArray ) 36 { 37 document.writeln( "<h2>" + header + "</h2>" ); 38 document.writeln( "<table border = "1" width =" + 39 ""100%">" ); 40 41 document.writeln( "<thead><th width = "100"" + 42 "align = "left">Subscript</th>" + 43 "<th align = "left">Value</th></thead><tbody>" ); The for loop adds five elements to Array n2 and initialize each element to its subscript number (0 to 4). Each function displays the contents of its respective Array in an XHTML table. The first time function ouputArray is called, variable header gets the value of “Array n1 contains” and variable theArray gets the value of n1. The second time function ouputArray is called, variable header gets the value of “Array n2 contains” and variable theArray gets the value of n2.
  • 9. Outline 44 45 for ( var i = 0; i < theArray.length; i++ ) 46 document.writeln( "<tr><td>" + i + "</td><td>" + 47 theArray[ i ] + "</td></tr>" ); 48 49 document.writeln( "</tbody></table>" ); 50 } 51 // --> 52 </script> 53 54 </head><body onload = "initializeArrays()"></body> 55 </html>
  • 11. 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
  • 12. Outline SumArray.html (1 of 2) 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 4 5 <!-- Fig. 11.5: SumArray.html --> 6 <!-- Summing Elements of an Array --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Sum the Elements of an Array</title> 11 12 <script type = "text/javascript"> 13 <!-- 14 function start() 15 { 16 var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; 17 var total1 = 0, total2 = 0; 18 19 for ( var i = 0; i < theArray.length; i++ ) 20 total1 += theArray[ i ]; 21 22 document.writeln( "Total using subscripts: " + total1 ); 23 The for loop sums the values contained in the 10- element integer array called theArray.
  • 13. Outline SumArray.html (2 of 2) 24 for ( var element in theArray ) 25 total2 += theArray[ element ]; 26 27 document.writeln( "<br />Total using for...in: " + 28 total2 ); 29 } 30 // --> 31 </script> 32 33 </head><body onload = "start()"></body> 34 </html> Variable element is assigned a subscript in the range of 0 up to, but not including, theArray.length.
  • 14. Multidimensional Arrays  Two-dimensional arrays analogous to tables – Rows and columns  Specify row first, then column – Two subscripts
  • 15. 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.
  • 16. Multidimensional Arrays  Declaring and initializing multidimensional arrays – Group by row in square brackets – Treated as arrays of arrays – Creating array b with one row of two elements and a second row of three elements: var b = [ [ 1, 2 ], [ 3, 4, 5 ] ];
  • 17. Multidimensional Arrays  Also possible to use new operator – Create array b with two rows, first with five columns and second with three: var b; b = new Array( 2 ); b[ 0 ] = new Array( 5 ); b[ 1 ] = new Array( 3 );
  • 18. Outline InitArray3.html (1 of 2) 1 <?xml version = "1.0"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 4 5 <!-- Fig. 11.13: InitArray3.html --> 6 <!-- Initializing Multidimensional Arrays --> 7 8 <html xmlns = "http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>Initializing Multidimensional Arrays</title> 11 12 <script type = "text/javascript"> 13 <!-- 14 function start() 15 { 16 var array1 = [ [ 1, 2, 3 ], // first row 17 [ 4, 5, 6 ] ]; // second row 18 var array2 = [ [ 1, 2 ], // first row 19 [ 3 ], // second row 20 [ 4, 5, 6 ] ]; // third row 21 22 outputArray( "Values in array1 by row", array1 ); 23 outputArray( "Values in array2 by row", array2 ); 24 } Array array1 provides six initializers in two rows. Array array2 provides six initializers in three rows. Function outputArray displays each array’s elements in a Web page.
  • 19. Outline InitArray3.html (2 of 2) 25 26 function outputArray( header, theArray ) 27 { 28 document.writeln( "<h2>" + header + "</h2><tt>" ); 29 30 for ( var i in theArray ) { 31 32 for ( var j in theArray[ i ] ) 33 document.write( theArray[ i ][ j ] + " " ); 34 35 document.writeln( "<br />" ); 36 } 37 38 document.writeln( "</tt>" ); 39 } 40 // --> 41 </script> 42 43 </head><body onload = "start()"></body> 44 </html> Referencing the multidimensional array theArray.