Implementing stack in Javascript with TDD

Stacks are everywhere. Even the most popular programming website has stack in its domain. Everyone seems to talk about stacks all the time. When we code in Java quite often our computers presents us with beautiful java.lang.StackOverFlowError.

When we do it in Javascript we are blessed with Maximum call stack size exceeded.

If you never got any of these, then hats off. Otherwise, if you do encounter them and would like to know more about stack data structure…



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store