pop
Removes the last item from an array and returns that item. An equivalent of Array.prototype.pop.
The
popmethod raises thechangeevent. Theactionfield of the event argument is set to"remove". Theitemsfield 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