Edit this page

pop

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

Important: 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();
console.log(array.length); // outputs "0"
console.log(result.get("name")); // outputs "John Doe"
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy