Why implement Stack in JavaScript when you have Array?
This is the stupidly simple question I asked myself today as I was trying to familiarise myself with data structures. Is there ever a need to implement a stack data structure in JavaScript when the built-in Array data structure already exists? Based on my short research, the answer is no - there’s…