Pergunta de entrevista da empresa WorkJam

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

Resposta da entrevista

Sigiloso

29 de jan. de 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