Returns the day of the week (0=Sunday - 6=Saturday).
Syntax
date.getDay()Example
Enter values below to update the example in real time.
const→new→Monday→console→getDay→Sun→Mon→const date = new Date(2024, 0, 1); // Monday
console.log(date.getDay()); // 1 (0=Sun, 1=Mon)