We will create one day array with all the names of the seven days will be stored. Based on the value returned by getDay function the name of the day will be displayed from the array.
Here is the demo of the getDay function.
Here is the full code of the above demo.
<title>(Type a title for your page here)</title>
var my_day=new Date()
//var dt = new Date(\"Aug 16, 2005 05:55:00\");
var day_name=new Array(7);
alert ("Today Day is = " + day_name[my_day.getDay()]);
<input type=button value="Show Day" onclick="show_now();">