Instance-of
Syntax
obj is Foo
Explanation
Returns if the left operand is an instance of the right operand. If an object is an instanceof a class's superclass, this operator will return true for the superclass.
Examples
// Where: Dog IS-A Animal
let o := Dog { ... }
o is Animal
Last updated
Was this helpful?