Skip to content

Equality and is‐Operator

Julius Paffrath edited this page Jul 9, 2026 · 1 revision

In jask you have two ways of checking equality. Value equality (==) and reference equality (is).

set a to "Test"
set b to "Test"

assert(a == "Test") ; true
assert(a == b) ; true

assert(a is "Test") ; false
assert(a is b) ; false
assert(a is a) ; true

With the keyword is you can check if two variables are the same instance. Check the following example:

set a to 1
set b to a

assert(a is b) ; true

set a to 2

assert(a is b) ; false

Clone this wiki locally