pop
优质
小牛编辑
131浏览
2023-12-01
Returns a new sequence with the same elements as this one, minus the last element.
Signature
ArrayLikeSequence.pop = function() { /*...*/ }
ArrayLikeSequence.pop = function pop() { return this.initial(); }
Name | Type(s) | Description |
---|---|---|
returns | ArrayLikeSequence | The new array-like sequence. |
Examples
Lazy([1, 2, 3]).pop() // sequence: [1, 2] Lazy([]).pop() // sequence: []