How to get date in JSON format with JavaScript

1 Answer

0 votes
const json = new Date().toJSON();

console.log(json);


 
  
  
  
/*
run:
  
"2022-03-15T07:29:24.164Z"
  
*/

 



answered Mar 15, 2022 by avibootz

Related questions

...