how to get data of the current date in javascript code example
Example 1: return current date in javascript
let today = new Date().toLocaleDateString()
console.log(today)
Example 2: get date in javascript
function getTodayDate() {
let d = new Date();
return d;
}
console.log(getTodayDate());
//2020-12-06T09:53:14.105Z