美文网首页JavaScript
[EcmaScript] Date作为普通函数来调用

[EcmaScript] Date作为普通函数来调用

作者: 何幻 | 来源:发表于2016-03-08 07:19 被阅读33次
    Date()
    "Thu Feb 18 2016 13:20:36 GMT+0800 (CST)"
    

    EcmaScript 6
    20.3.2 The Date Constructor

    The Date constructor is the %Date% intrinsic object and the initial value of the Date property of the global object.

    When called as a constructor it creates and initializes a new Date object.
    When Date is called as a function rather than as a constructor, it returns a String representing the current time (UTC).

    相关文章

      网友评论

        本文标题:[EcmaScript] Date作为普通函数来调用

        本文链接:https://www.haomeiwen.com/subject/dolnkttx.html