Lodash toString method
语法
Converts value to a string. An empty string is returned for null and undefined values. The sign of-0 is preserved.
参数
value (*) − The value to convert.
输出
(string) − Returns the converted string.
实例
var _ = require('lodash');
console.log(_.toString(-0));
console.log(_.toString([1, 2, 3]));
Save the above program in
tester.js. Run the following command to execute this program.
Command
输出