Lecture+17+-+JS+Arrays+2

Lecture+17+-+JS+Arrays+2 - CS170Lecture13 JSArrayspart2...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 170 Lecture 13 JS Arrays part 2 Kristian Stout [email protected] Office IN: Livingston Student Center, A lounge near “the rock” and the commuter lounge. Office Hours: TTH 5:30 – 6:30
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
A 325 62% B 139 27% C 38 7% D 11 2% F 11 2% Total 470 Average 89 Median 92 Hourly Exam 1 Results Hourly Exam 1 Results
Background image of page 2
Arrays with loops Loops are often used with arrays to: initialize an array make changes to the values stored in an array output everything stored in an array You can use any type of loop : for, while or do
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
That’s boring, no output. But how do we know how many names we need to print out ?  If we print too many we get   “undefined” values … 
Background image of page 8
In cases where we did not specify a length we  can find out how many elements are in an  array after the fact. we use the    [array].length   property for this
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/17/2011 for the course BUSINESS 198:170 taught by Professor Staff during the Spring '09 term at Rutgers.

Page1 / 29

Lecture+17+-+JS+Arrays+2 - CS170Lecture13 JSArrayspart2...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online