Difference between revisions of "Push"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "<c>push</c> appends an item to the end of a list, or inserts it into a map as a key with a value of 1. See also: pop; pull; insert === Arguments === {| class="wi...")
 
 
Line 9: Line 9:
 
|-
 
|-
 
| ''self'' || list or map || object to append an element to
 
| ''self'' || list or map || object to append an element to
 +
|-
 +
| ''value'' || null || value to append
 
|}
 
|}
  

Latest revision as of 23:19, 30 July 2022

push appends an item to the end of a list, or inserts it into a map as a key with a value of 1.

See also: pop; pull; insert

Arguments

Parameter Name Default Value Meaning
self list or map object to append an element to
value null value to append

Usage Notes

push may be called with function syntax or dot syntax.