To display the month name in full, we will write one array with all the month names inside it. Then based on the value returned by getMonth function we will display the corresponding element from this month array.
We will connect our button to display the current month in an alert window. Here is the demo.
Here is the code.
This article is written by plus2net.com team.