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 12-09-2024
250

Submit your answer