Question: How do I add month to my footer in javascript ? This is what I did but i only see the year but not the
How do I add month to my footer in javascript ? This is what I did but i only see the year but not the month
var log = '
This is a message in the console log.
';function showCopy() {
var d = new Date();
var year = d.getFullYear();
var month = d.getMonth();
var footer = document.getElementsByTagName('footer')[0];
var p = document.createElement('p');
p.innerHTML = '© '+ month +'' + year +' by Abiodun Ogunwomoju. All Rights Reserved.';
footer.appendChild(p);
log += '
A paragraph has been added to the footer.
';}
window.onload = showCopy;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
