Is there a way to convert javascript Date object to string but retain the format as displayed when console.log is used on the Date object? : <p>I want to convert the date object to string but I want it in the same format as it is displayed when I do <code>console.log(new Date())</code> which is something like '2019-05-21T11:55:39.496Z' and not the usual extended format we get when we do <code>console.log(new Date().toString())</code> which is something like this 'Tue May 21 2019 17:28:51 GMT+0530 (India Standard Time)'.</p>
