You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<title>Extracting the month name from a date</title>
<style>
body {
margin: 1em;
font-size: 1.5em;
}
div {
margin-top: .5em;
}
</style>
</head>
<body>
<div id="output">
</div>
<script>
const dateNow = new Date();
document.getElementById("output").innerHTML = `The date is ${dateNow}<br>The month name is ${dateNow.toLocaleDateString('default', { month: 'long' })}`;