aboutsummaryrefslogtreecommitdiff
path: root/help/assert_assertwithmessage.md
blob: 2a027b5f2b24a0de30b9e7f707d7830b693cab2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/assert_assertwithmessage.html).*

# Exclamation Mark (`!`)

## `! 𝕩`: Assert

Throw an error if `𝕩` is not 1.

        ! 1

        ! 2

        ! "hello"




## `𝕨 ! 𝕩`: Assert With Message

Throw an error with message `𝕨` if `𝕩` is not 1.

        "hi" ! 1

        "two" ! 2

        "hello error" ! "hello"