getUTCDay()

Introduction

The getUTCDay() method returns the day of the week, according to universal time (from 0-6. The following is the syntax for the getUTCDay() method.

obj.getUTCDay();

Example

The following is the code for the getUTCDay() method.

var obj = new Date(); document.write(obj.getUTCDay());

On running the above code, the following output is obtained.