Difference between revisions of "Pull"
Jump to navigation
Jump to search
(Created page with "<c>pull</c> removes and returns the first item in a list, or an arbitrary key of a map. If the list or map is empty (or if called on any other data type), returns null. See...") |
(No difference)
|
Latest revision as of 15:45, 17 March 2020
pull
removes and returns the first item in a list, or an arbitrary
key of a map. If the list or map is empty (or if called on any other data type), returns null.
Arguments
Parameter Name | Default Value | Meaning |
---|---|---|
self | list or map | object to remove an element from the end of |
Usage Notes
pull
may be called with function syntax or dot syntax.
Example
[1, 2, 3].pull // returns (and removes) 1