-
An array has what symbol in front of it?
@
-
Declare an array Brinkman and name all the children
@Brinkman = ("Cassie", "Ethan", "Owen");
-
@Brinkman = ("Cassie", "Ethan", "Owen") - what it @Brinkman[2]?
Owen ... we start with 0 not 1.
-
Pull the last variable in an an array
pop() as in $lastvalue = pop(@brinkman);
-
add variables to the end of array using what function?
push as in push(@brinkman, "Melony"); makes "Cassie", "Ethan", "Owen", "melony";
-
Add to the beginning of array function
unshift(@Brinkman, "melony"); makes "melony", "Cassie", "Ethan", "Owen"
-
pull the first value from an array
shift(@brinkman) extracts from the array ("Cassie", "Ethan", "Owen") the result "Cassie"
-
flip the order of an array
reverse(@brinkman) flips ("Cassie", "Ethan", "Owen") to ("Owen", "Ethan", "Cassie")
-
What is a hash?
a type of variable that has a name instead of a letter to mark it's variables. key - value pairs
-
hash arrays use what symbols to start the array
% as in %brinkman
-
Create a hash array
%officers = ("president","scott","CEO","kendell","secretary","trish");
-
View all the keys from a hash array
keys(%officers);
-
view all the values from a hash array
values(%officers);
-
delete a variable in a hash array
delete $officers{"VP"}; as in $hashname {"keyname"};
|
|