Course · Section 14: Object-Oriented Programming (OOP) With JavaScript · Lecture 226: ES6 Classes
Define a `Stack` class with `push` and `pop`, and implement `stackOps(values)` that pushes every value then pops them all, returning the popped values in order.
+ 1 hidden test run on Submit.
A stack is last-in-first-out, so pushing then popping all items yields them reversed.
Run your code to see results.