JanetDocsPlaygroundI'm feeling luckyGitHub sign in

unless



    macro
    boot.janet on line 193, column 1

    (unless condition & body)

    Shorthand for `(when (not condition) ;body)`.


2 examplesSign in to add an example
Loading...
(let [x false]
  (var y 0)
  (unless x
    (++ y)
    (++ y))
  y)
# => 2
sogaiuPlayground
(let [x 10]
  (unless (= x 10)
    (print "x is not 10!")
  )
)

# => nil

(let [x 5]
  (unless (= x 10)
    (print "x is not 10!")
  )
)

# => "x is not 10!"
HoangTuan110Playground