Javascript - Write program to convert Date object to string

Requirements

Write program to convert Date object to string

let d = new Date();
console.log( d );
//your code here

Hint

Use the toDateString() method to convert the date to a more readable format.

Demo

let d = new Date();
console.log( d );
console.log( d.toDateString());

Result

Related Exercise