Underscore.JS - now 方法



语法

_.now()

now 方法使用运行时最快的可用方法返回当前时间戳。请看以下示例 −

示例

var _ = require('underscore');

console.log(_.now());

将上述程序保存在 tester.js 中。运行以下命令来执行此程序。

命令

\>node tester.js

输出

1590549158176
underscorejs_utilities.htm
广告
© . All rights reserved.