Several operators can be applied to objects of any type.
Info |
---|
title | Engine Compatibility |
---|
|
In the node pico engine, the The target types for the as() function and the results returned from the typeof() function are these values: "Array"
"Boolean"
"Map"
"Null"
"Number"
"RegExp" "String"
The following coercions are valid: - Strings can be coerced to numbers (0 on failure
null if not parsable) and regular expressions. - Numbers can be coerced to strings.
- Regular expressions can be coerced to strings.
- Any expression can be coerced to Boolean.
null and false can be coerced to 0, andtrue can be coerced to 1
An error is thrown for other attempted coercions, unless the value being coerced by as() is already of the target type. |
...