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 09-02-2026
254

Submit your answer