01:198:170 Lecture 17: Lecture #17
taupebee294 and 9 others unlocked
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)