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);
var mydate = new Date('23/4/2021 6:15 pm');
console.log(mydate.toDateString());
const timeNow = new Date();
console.log(timeNow); // shows current date and time
/*Get date from JS API - Date() class*/
let local_date = new Date();
alert("it is " + local_date + "!")