JanetDocsPlaygroundI'm feeling luckyGitHub sign in

assert



    function
    boot.janet on line 146, column 1

    (assert x &opt err)

    Throw an error if x is not truthy.


1 exampleSign in to add an example
Loading...
(var a 0)
(assert (pos? a) "A is definitely not positive")
# error: A is definitely not positive
#  in assert [boot.janet] on line 149, column 11
#  in _thunk [repl] (tailcall) on line 3, column 1
pepePlayground