var result = new Date( in javascript code example
Example 1: new date() javascript
var date = new Date(); //Will use computers date by default.
//parameters will specify date you put to input
var date = new Date(year, month, day, hours, minutes, seconds, milliseconds);
Example 2: new date javascript
/*Get date from JS API - Date() class*/
let local_date = new Date();
alert("it is " + local_date + "!")