New to Kendo UI for jQueryStart a free 30-day trial

Shift

methods

Removes the first item from an ObvservableArray and returns that item. An equivalent of Array.prototype.shift.

The shift method raises the change event. The action field of the event argument is set to "remove". The items field of the event argument is an array that contains the removed item.

Returns:Object

—The item which was removed.

<script>
var array = new kendo.data.ObservableArray([1, 2, 3]);
var removed = array.shift();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(removed); // outputs "1"
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(array.length); // outputs "2"
</script>
Not finding the help you need?
Contact Support