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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!