The asString() method returns a string representing the value by explicitly using String(value).
String(
)
0.4.3
const arr = [ 1, 2, 3];asString(arr); // "1,2,3"asString(null); // "null"asString(undefined); // "undefined"asString(42); // "42"asString(Symbol.for("Hello")); // "Symbol(Hello)" Copy
const arr = [ 1, 2, 3];asString(arr); // "1,2,3"asString(null); // "null"asString(undefined); // "undefined"asString(42); // "42"asString(Symbol.for("Hello")); // "Symbol(Hello)"
The value to get a string representation of
The asString() method returns a string representing the value by explicitly using
String(
value)
.Since
0.4.3
Example