javascript type

This block is part of the value group and was last modified in core v12.0.4.

javascript type v12.0.4

Returns the JS-engine type of a given value

In pins 1
  • value required
    value
Out pins 1
  • type
    value

Outputs a type name string: null, number, NaN, Infinity, string, boolean, array, or object. This DIVERGES from raw JS typeof: nil reports "null" (not "object"), arrays report "array", and NaN/Infinity are named explicitly. Strings always report "string" - numeric-looking text is NOT sniffed.

typoef

A typical wiring for javascript type: value feeds the value pin; the value out pin feeds convert to uppercase.

Studio canvas example for the javascript type block: typical wiring for javascript type.

Version history

Introduced in v12.0.4.


Back to value Return to the main group to view all sub-groups Back to value Return to the group to view all blocks within this group