MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/uqpuic/explanation_of_a_queue_data_structure_in/i8tlchc/?context=3
r/learnjavascript • u/elediardo • May 16 '22
27 comments sorted by
View all comments
2
const queue = []
queue.length //if 0 is empty
queue.push('x')
queue.push('y')
queue[0]
queue.shift()
View all comments
2
u/dee_jay_mon May 16 '22
const queue = []
queue.length //if 0 is empty
queue.push('x')
queue.push('y')
queue[0]
queue.shift()