Home  >  Q&A  >  body text

javascript - new Date().getDay(), the operator new here takes precedence over the . sign

The document shows that new is after the period. What's going on?

PHP中文网PHP中文网2710 days ago532

reply all(1)I'll reply

  • 某草草

    某草草2017-05-19 10:25:51

    new with parameter list (new Date())跟成员访问(.)同个优先级,.按左往右执行;不带参数列表的(new Date) is one level lower.

    reply
    0
  • Cancelreply