Array 스택 pop(), 큐 shift()
Stack (First In Last Out) Stack 구현 pop() 사용 const data = [1, 2, 3] data.pop() data.pop() // Pop After : [ 1 ] console.log('Pop After : ', data) Quere (First in First Out) Quere 구현 shift() 사용 const data = [1, 2, 3] data.shift() data.shift() // Pop After : [ 3 ] console.log('Shift After : ', data)
2022.12.12