A slightly faster alternative for the queue would be this:
enqueue(item){returnqueue.push(item);}dequeue(){returnqueue.shift();}peek(){returnqueue[0];}// no need to calculate the length of the array or any math ;)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A slightly faster alternative for the queue would be this: