Lecture+16+-+JS+Arrays+1

Lecture+16+-+JS+Arrays+1 - CS170Lecture13 JSArrayspart1...

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

View Full Document Right Arrow Icon
CS 170 Lecture 13 JS Arrays part 1 Kristian Stout stouty@rci.rutgers.edu 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
Arrays The Array object is used to store a set of  values in a single variable name. An array is an ordered collection of data Each element of the array can be considered  as a variable and each stores a value. Remember the memory diagram from the lecture on hardware ?
Background image of page 2
Arrays Why do we need them ? Grouping similar variables under one name Reduction in the number of different variables  required When used with loops, lines of code reduced Can be used when length of input is not known
Background image of page 3

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

View Full DocumentRight Arrow Icon
Array Declaration and Assignment Declaration Syntax  var  array_name =  new Array ( array_size); array_name:  Any valid array name is permitted. The rules are  the same as those for variable names
Background image of page 4
Image of page 5
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 / 19

Lecture+16+-+JS+Arrays+1 - CS170Lecture13 JSArrayspart1...

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

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