'how to get the next item from an javascript array?
So, i have built and array of all the month and i am to get the current month from it by using the getDate function but i wanna scroll through it
const month = ["Januray", "Feburary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
let d = new Date();
let showMonth = month[d.getMonth()]
monthEl.textContent = showMonth
how to i get the next month when i click on a element with onclick="next()" i have read other various solutions but those consists of complex arrays that i am unable to comprehend due to myself being new programming
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
