JanetDocsPlaygroundI'm feeling luckyGitHub sign in

array/clear



    cfunction

    (array/clear arr)

    Empties an array, setting it's count to 0 but does not free the 
    backing capacity. Returns the modified array.


1 exampleSign in to add an example
Loading...
(def a @[23 42])
(array/clear a)
(pp a)
# => prints @[]
pepePlayground