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 14-09-2026
284

Submit your answer