So I'm trying to get my date displayed in my innerhtml but problem is I cant find out as to why its not spacing out or displaying like this 
My code JS code is
function myFunction() {
// day of the month, day of the week month and year
var p = document.getElementById("mydata");
var mydate = new Date();
var day = mydate.getDay();
var month = mydate.getMonth();
var year = mydate.getYear();
var d = mydate.getDate();
var dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
p.innerHTML = "Today is the " + d + dayNames[day] + month + year;
}
and html is
<!DOCTYPE html>
<html lang="en">
<head>
<!-- link to external JS file. Note that <script> has an
end </script> tag -->
<meta charset="utf-8">
<title> Task 5 </title>
<link href="style.css" type="text/css" rel="stylesheet">
<script src="task5.js" type="text/javascript"></script>
</head>
<body>
<!-- Create a paragraph with id mydata -->
<div id="box">
<p id="mydata"> Todays Date</p>
<p> <button onclick="myFunction();"> Click </button></p>
</div>
</body>
</html>
"Today is the " + d + " (" + daynames[day] + ") "etc etc"Today is the " + d + dayNames[day] + month + year;<--- look at what you are doing.... I see no spaces