Question: The result shows **"Monday1"** because **.getDay** method displays 1 as Monday. 

```
var dob = new Date("April 2,1984");
var weekDay = dob.getDay();
if (weekDay==1) {
document.write('Monday');
}
document.write(weekDay);

```

Is there any way to get rid of the number and leave just Monday word?

Answer: 
**Example**

Return the name of the weekday (not just a number):

```
var d = new Date();
var weekday = new Array(7);
weekday[0] =  "Sunday";
weekday[1] = "Monday";
weekday[2] = "Tuesday";
weekday[3] = "Wednesday";
weekday[4] = "Thursday";
weekday[5] = "Friday";
weekday[6] = "Saturday";

var n = weekday[d.getDay()];

```

The result of n will be:

```
Tuesday

```

Source: <https://www.w3schools.com/jsref/jsref_getday.asp>
Hmm, I guess the issue you are facing is that you'll have to write multiple if else and checks. You can use the below function to get it done once and for all

```
function myFunction() {
  var d = new Date();
  var weekday = new Array(7);
  weekday[0] = "Sunday";
  weekday[1] = "Monday";
  weekday[2] = "Tuesday";
  weekday[3] = "Wednesday";
  weekday[4] = "Thursday";
  weekday[5] = "Friday";
  weekday[6] = "Saturday";

  var n = weekday[d.getDay()];
  alert(n);
}

```

Hope this helps.