Run ❯
Get your
own
website
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
JavaScript Dates
The getDay() Method
Return the weekday as a number.
You can use an array of names to return the weekday as a name: