We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

JS::ToBoolean

This article covers features introduced in SpiderMonkey 17

Convert any JavaScript value to a boolean.

Syntax

bool
JS::ToBoolean(JS::HandleValue v)
Name Type Description
v JS::HandleValue The value to convert.

Description

JS::ToBoolean converts a JavaScript value to a boolean. It implements the ToBoolean operation described in ECMA 262-3 §9.2. This function can not fail and the return value is always the boolean conversion of the argument.

Document Tags and Contributors

Contributors to this page: arai, evilpie
Last updated by: arai,