Role: Returns a number representing the day of the week.
Syntax: dateObject.getDay ()
Returns: Week dateObject referred to in one day, local time. The return value is an integer from 0 (Sunday) to between 6 (Saturday) in the .
Note: This method is always used in conjunction with a Date object.
var d=new Date()
console.log(d.getDay())