We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


This article covers features introduced in SpiderMonkey 17

Convert a C floating-point number of type double to a JS::Value.


// Added in SpiderMonkey 42
JS_NumberValue(double d);

// Obsolete since SpiderMonkey 42
JS_NumberValue(double d);
Name Type Description
d double The numeric value to convert.


JS_NumberValue converts a C floating-point number of type double to JS::Value, the type of JavaScript values.

The result is an integer JS::Value if d can be stored that way. Otherwise, a new floating-point JS::Value is created.

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, kscarfone, scavenger, tschneidereit, Jorend, Dria, MMondor
 Last updated by: arai,