Moesif Interview Question

Design a Maxstack in Javascript