Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at


Returns a string representation of a JSVersion value.


const char *
JS_VersionToString(JSVersion version);
Name Type Description
version JSVersion Version value to convert.


JS_VersionToString attempts to convert the version to a const char * string representation. JS_VersionToString may return any of the following values:

Enumeration String
JSVERSION_1_0 "1.0" Obsolete since JSAPI 24
JSVERSION_1_1 "1.1" Obsolete since JSAPI 24
JSVERSION_1_2 "1.2" Obsolete since JSAPI 24
JSVERSION_1_3 "1.3" Obsolete since JSAPI 24
JSVERSION_1_4 "1.4" Obsolete since JSAPI 24
JSVERSION_1_5 "1.5" Obsolete since JSAPI 24
JSVERSION_1_6 "1.6"
JSVERSION_1_7 "1.7"
JSVERSION_1_8 "1.8"
Other NULL

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, Jorend, Jimb, Cheatah
 Last updated by: arai,