How to convert date to string in JavaScript

1 Answer

0 votes
const dt = new Date();

let s = dt.toString();

console.log(s);




/*
run:

Wed Nov 17 2021 11:37:15 GMT+0200 (Israel Standard Time)

*/

 



answered Nov 17, 2021 by avibootz
...