JS Slice only removes Items when they were in the Constructor

I try to remove the first Item so that all other move up in an Array I create with

..
Queue: [],
..

and dynamically push Items into. I later use slice to remove them and have then next Item be the first one.

..
thread.Queue.slice(0, 1);
..

It should return the first Item of the Array, which it does, but it should also remove it from the array and move all other up.

Here is a example which shows, that is neither working in the Browser. (I found this 'behaviour' in Node.js)

http://jsfiddle.net/bTrsE/

or rather

http://gyazo.com/b3dcdbf4f74642c04fe1c1025f225a08.png

The .slice() method does not alter the original array. It returns a shallow copy of the portion of the array you asked for.

Array.Slice = Is an implementation of SubArray, From an array you want to extract certain elements from the index and return a new array.

Example:

var cars = ['Nissan','Honda','Toyota'];

var bestCars = cars.splice(0,1);

console.log(bestCars);

//This should output Nissan Because i like Nissan

For your problem you should be looking Array.Splice(), splice adds / removes an element from the index

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice