Meta Interview Question

Explain how to write stack in javascript?