code
Format Date
This JavaScript code defines a function formatDate to format a given date using toLocaleDateString with specific formatting options. It then gets the current date, formats it using the function, and logs the formatted date to the console.
Date formatting
toLocaleDateString