I have this javascript that will determine the day of the week:
<script>
function myFunction() {
var d = new Date();
var n = d.getDay()
document.getElementById("demo").innerHTML = n;
}
</script>
<p id="demo"></p>
Running this code, it'll display 4
. Is there anyway I can convert this to an actual string/word like thursday
?