How to get current date in Javascript?

Get current date in Javascript i get the current date by below code. var utc = new Date().toJSON().slice(0,10).replace(/-/g,"-");
Faisal Khan
Asked 22-08-2026
266

Submit your answer