{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture+17+-+JS+Arrays+2

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

Info icon This 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
Image of page 1

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

View Full Document Right 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
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
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
Image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
Image of page 7

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

View Full Document Right 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 … 
Image of page 8
Finding the length of an array In cases where we did not specify a length we  can find out how many elements are in an  array after the fact.
Image of page 9

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern