01:198:170 Lecture 17: Lecture #17

37 views3 pages
taupebee294 and 9 others unlocked
01:198:170 Full Course Notes
9
01:198:170 Full Course Notes
Verified Note
9 documents

Document Summary

Local function: exists only in the function (w/i curly braces; part of parameters) You run the code from top to bottom (local variables override global) For loop is a self-contained loop: need initialized control variable, counter for loop to work, & change/update process so counter changes x. 4 cnt no longer exists when loop is done. Thursday, november 3, 2016: an array is a list of elements, an array has a name, just like a variable, except we add square brackets, indexing value starts at zero. When you reference an array, you reference it by its index value: . length always returns # of elements in array (how big the array is) Last element has an index (length of array - 1) Reference the array by using square brackets: can assign values to an array by using square brackets (by changing index values)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents