Pregunta de entrevista de WorkJam

Implement the push() and pop() operations of a stack using an array.

Respuesta de la entrevista

Anónimo

29 ene 2020

let myArray=[]; myArray.push("world"); // ["world"] myArray.push("Hello"); // ["Hello"] log.console(myArray.pop()); // Hello log.console(myArray.pop()); // world That took 2 minutes, not 20.

1