5
Stacks
Have you ever used Undo or Redo when working on something (Figure 5-1)?
Have you ever wondered how your favorite programming languages tend to turn the things you write into sequential steps so that your computer knows what to do? Have you ever gone forward and backward in your browser? Do you like pancakes?
If you answered yes to any of the above questions, then you have probably run into the star of this tutorial, the stack data structure. In the following sections, we learn more about stacks and how you can use one in JavaScript.
Onward!
Meet the Stack
At some point in our lives, we have almost certainly ...
Get Absolute Beginner's Guide to Algorithms: A Practical Introduction to Data Structures and Algorithms in JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.