Difference between revisions of "Last Command"
From GeoGebra Manual
Line 2: | Line 2: | ||
{{command|list}} | {{command|list}} | ||
; Last[List L]: Returns list containing the last element of the list L. | ; Last[List L]: Returns list containing the last element of the list L. | ||
+ | {{Example|1=<code>Last[{1,2,3}]</code> returns {3}.}} | ||
; Last[List L, Number n of Elements]: Returns a list containing just the last ''n'' elements of the list L. | ; Last[List L, Number n of Elements]: Returns a list containing just the last ''n'' elements of the list L. | ||
;Last[Text] | ;Last[Text] |
Revision as of 14:46, 23 March 2011
- Last[List L]
- Returns list containing the last element of the list L.
Example:
Last[{1,2,3}]
returns {3}.- Last[List L, Number n of Elements]
- Returns a list containing just the last n elements of the list L.
- Last[Text]
Returns last character of the text.
- Last[Text, Number n of Elements]
Returns the last n characters of the text.
Example:
Last["Hello",2]
returns "lo".