Chandler Barlow
Sep 30, 2021

--

Great article! Your stack implementation will not work though. In the stack constructor ( line 7) count needs an underscore. Also on line 40 you have a typo with "storaget". Another issue is that the peek function returns this.storage[count — 1] which results in an error because the items are indexed off of count directly. So if you only had one item in the stack it would return undefined, and then for every subsequent item it would return the item prior. This is also an issue with the pop function. None the less, great article! Thank you for writing this :)

--

--

Chandler Barlow

Fullstack Developer at Irys / JavaScript Junkie / Creative Coder