MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / pop

Method pop

packages/core/data/observable-array/index.ts:182–193  ·  view source on GitHub ↗

* Removes the last element from an array and returns it.

()

Source from the content-addressed store, hash-verified

180 * Removes the last element from an array and returns it.
181 */
182 pop(): T {
183 this._deleteArgs.index = this._array.length - 1;
184
185 const result = this._array.pop();
186
187 this._deleteArgs.removed = [result];
188
189 this.notify(this._deleteArgs);
190 this._notifyLengthChange();
191
192 return result;
193 }
194
195 /**
196 * Appends new elements to an array, and returns the new length of the array.

Calls 2

_notifyLengthChangeMethod · 0.95
notifyMethod · 0.65

Tested by

no test coverage detected