By the Date.prototype.getDay() method to get the day of the week. This method returns a numeric value that is between 0 and 6. 0 is considered to be a Sunday and 6 is considered to be Saturday.