TypeOf
Returns the type name of a Jyro value as a lowercase string representation.
Syntax
TypeOf(value)
Parameters
- value (any): The value to inspect for type information
Returns
- string: The lowercase type name of the input value
Description
Provides runtime type inspection capabilities for dynamic type checking and conditional logic based on value types within Jyro scripts.
Examples
var result1 = TypeOf(42) # Returns "number"
var result2 = TypeOf("hello") # Returns "string"
var result3 = TypeOf(true) # Returns "boolean"
var result4 = TypeOf(array [1, 2, 3]) # Returns "array"
var result5 = TypeOf(object {"a": 1}) # Returns "object"
var result6 = TypeOf(null) # Returns "null"