Arrays: Difference between revisions
Content added Content deleted
(Added array description) |
|||
Line 4,255: | Line 4,255: | ||
x[:-1] [42, 3.14, 7, "hike"] (everything up to the last item) |
x[:-1] [42, 3.14, 7, "hike"] (everything up to the last item) |
||
</pre> |
</pre> |
||
Example: |
|||
<lang MiniScript>arr = ["a", 1, 3] |
<lang MiniScript>arr = ["a", 1, 3] |
||
print arr[0] |
print arr[0] |
||
arr.push("x") |
arr.push("x") |
||
print arr.pop() |
print arr.pop()</lang> |
||
</lang> |
|||
=={{header|Modula-2}}== |
=={{header|Modula-2}}== |