JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

last

core-api


    function
    boot.janet on line 919, column 1

    (last x)

    Get the final element from `x`.

    `x` can be a bytes, indexed, or abstract type value with suitable 
    `get` and `length` methods.


4 examplesSign in to add an example
Loading...
(last :hello)
# => 111
sogaiuPlayground
(last 'hello)
# => 111
sogaiuPlayground
(last "hello")
# => 111
sogaiuPlayground
(last [1 1 2 3 5 8])
# => 8
sogaiuPlayground