Function string
Create a string or convert any object into a string.
Elements of Arrays and Matrices are processed element wise.
Syntax
string(value)
Parameters
Parameter |
Type |
Description |
value |
* | Array | Matrix | null |
A value to convert to a string |
Returns
Type |
Description |
string | Array | Matrix |
The created string |
Examples
string(4.2); // returns string '4.2'
string(complex(3, 2); // returns string '3 + 2i'
var u = unit(5, 'km');
string(u.to('m')); // returns string '5000 m'
string([true, false]); // returns ['true', 'false']
See also
bignumber,
boolean,
complex,
matrix,
number,
unit