The toString() method of the Date object converts the date object to a string in the local timezone.

    
    // get now's date and time
    const now = new Date();

    console.log(now)
    // [object Date] { ... }

    const nowString = now.toString();

    console.log(nowString);
    // "Sat Jan 27 2024 14:16:59 GMT-0500 (Eastern Standard Time)"