Douglas Crockford: “We should stop using JavaScript”
digest.browsertech.com
digest.browsertech.com
const m = new Map() // it's ordered
const q = []
q.push('a')
q.pop()Yes, arrays can be used as LIFO queues. They can also be used as FIFO queues with shift() instead of pop(), but the language does not specify a complexity bound on shift() so depending on the runtime it may be O(N). And then there’s priority queues.