pop

Removes the last item from an array and returns that item. An equivalent of Array.prototype.pop.

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

Returns

Object—The item which was removed.

Example - remove the last item from an ObservableArray

<script>
var array = new kendo.data.ObservableArray([{ name: "John Doe" }]);
var result = array.pop();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(array.length); // outputs "0"
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(result.get("name")); // outputs "John Doe"
</script>
In this article