optimizerPls = new Date(); vs optimizerPls = +new Date(); vs optimizerPls = Date.now(); vs optimizerPls = (new Date).getTime();

Edit on GitHub

Setup

var optimizerPls = null;

Tests

  • optimizerPls = new Date();

    new Date()
  • optimizerPls = +new Date();

    +new Date()
  • optimizerPls = Date.now();

    Date.now()
  • optimizerPls = (new Date).getTime();

    (new Date).getTime()