<input type="button" onclick="doStuff()" value="Click me">


function dataEvent() {
  let today = new Date();
  today.setSeconds(0);
  today.setMilliseconds(0);
  return today;
}

function doStuff() {
  let evt = dataEvent();
  alert(`Date is: ${evt} and seconds ${evt.getSeconds()} and milliseconds ${evt.getMilliseconds()}`);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.