3 ms·
The third tutorial "Manipulating Arrays" is broken. myQueue.unshift(); prints 3, no matter what variable is inserted prior. input: var myQueue = []; myQue
by anon525 13y ago
The third tutorial "Manipulating Arrays" is broken. myQueue.unshift(); prints 3, no matter what variable is inserted prior.
input:
var myQueue = [];
myQueue.push(1);
myQueue.push(2);
myQueue.push(3);
console.log(myQueue.unshift());
console.log(myQueue.unshift());
console.log(myQueue.unshift());
output:
3
3
3
- ronreiter 13y agothanks, fixed!