how to generate new date in javascript code example Example: return current date in javascript let today = new Date().toLocaleDateString() console.log(today)