Meta interview question

Explain how to write stack in javascript?