null-like constant
Problem it solves
Blocks don't normally have a way to produce the special values `undefined` or `null` directly.
What this block does
Returns either `undefined` or `null`, for the rare cases blocks-only projects need one of these values.
The block
Block ID: spriteutilnullconsts
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| constType | NullConsts | — | undefined or null |
Returns
undefined — The selected null-like value.
Example
let nothing = spriteutils.nullConsts(spriteutils.NullConsts.Undefined) console.log(nothing)
Add the extension
Add github:jwunderl/arcade-sprite-util to your project, or open: Import arcade-sprite-util.