perform language specific date and time formatting in JavaScript

JavaScript
3
var date = new Date();
var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
console.log(date.toLocaleDateString('en-US', options));
🤖 Code Explanation
This code will display the current date in the console in a format that includes the weekday, year, month, and day.

More problems solved in JavaScript




















