Converts value to a string.
value
An empty string is returned for null and undefined values. The sign of -0 is preserved.
null
undefined
-0
Optional
The value to convert.
Returns the converted string.
toString(null) // returns ''toString(undefined) // returns ''toString(-0) // returns '-0'toString([1, 2, -0]) // returns '1,2,-0'toString([Symbol('a'), Symbol('b')]) // returns 'Symbol(a),Symbol(b)' Copy
toString(null) // returns ''toString(undefined) // returns ''toString(-0) // returns '-0'toString([1, 2, -0]) // returns '1,2,-0'toString([Symbol('a'), Symbol('b')]) // returns 'Symbol(a),Symbol(b)'
Alias