Advertisement
Guest User

LIFO

a guest
Oct 20th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. push
  2. : a command to add a new item to the end of an array.
  3. pop
  4. : a command to remove the last item from the end of an array.
  5. shift
  6. : a command to remove the first item from the front of an array.
  7. unshift
  8. : a command to insert a new item at the front of an array.
  9. LIFO
  10. : Last in, first out. When a sequence of things are added to a list, the
  11. most recent (last) item is the first one we will consider.
  12. stack
  13. : a word to describe a list used in a last-in, first-out way.
  14. FIFO
  15. : First in, first out. When a sequence of things are added to a list, the
  16. oldest (first) item is the first one we will consider.
  17. queue
  18. : a word to describe a list used in a first-in, first-out way. Consider
  19. people waiting in line for movie tickets. The first person in line should be
  20. the first person to be able to purchase tickets.
  21. index
  22. : a number that tells which slot of the array is being considered.
  23. Numbering starts with zero at the front and counts up. Numbering from
  24. the back starts at -1 and counts down using negative numbers.
  25. foreach
  26. : a type of loop that avoids index numbers while still giving access
  27. to each array element in turn.
  28. split
  29. : a command to separate a string on certain boundaries thus creating
  30. an array.
  31. join
  32. : a command to combine the elements of an array thus creating a string.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement