I want an Array method similar to Array.pop() that exhibits First In First Out behavior, instead of the native FILO behavior. Is there an easy way to do so?
Imagine a javascript console:
>> array = [];
>> array.push(1);
>> array.push(2);
>> array.push(3);
>> array.fifopop();
1 <-- array.pop() yields 3, instead
array.shift().... or usearray.unshift()instead ofarray.push()then keep usingarray.pop()... shift/unshift works on array "top" ... push/pop works on array "bottom"