The getUTCDay() method is represented by the following syntax:
An integer value between 0 and 6 that represents the days of the week for the specified date.
Here, we will understand getUTCDay() method through various examples.
Let's see an example to print the value of today's weekday according to universal time.Test it Now
Day value : 3
Let's see an example to print the value of weekday from the given date according to universal time.Test it Now
Day value : 5 Day value : 6