BCHM 4400 Lecture Notes - Lecture 3: Hash Table, Foreach Loop, Comma-Separated Values

24 views3 pages

Document Summary

Array: variable that contains list of data elements. Array assignment: array can be assigned list of comma separated values. Range operator ( ): used to create list of values w/o writing all the numbers out. Pop(): take last element off an array and returns the value. The function removes the last number from the value array and returns it to the scalar variable, fred. Push(): reverses the pop() function and adds new elements to the end of an array. Shift(): takes first element off of an array and returns the value. Unshift(): reverses the shift function and adds new elements to the beginning of an array. Sort() function: takes a list of values and sorts them in the internal character order. Hash table: data structure that can look up values by names. Unlike arrays, hash tables can combine different values. Hash element = scalar and surrounded by {}

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