get current data and time in javascript code example
Example 1: how to use current data in javascript
var today = new Date();
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
Example 2: Get data and time in javascript
var date_time = new Date().toLocaleString();
console.log(date_time);