3 letter months javascript array

Solutions on MaxInterview for 3 letter months javascript array by the best coders in the world

showing results for - "3 letter months javascript array"
Léa
19 Apr 2020
1var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2var today = new Date();
3
4// Show date in "dd-mm-yyyy' format.
5var d = today.getDate();
6var m = months[today.getMonth()];
7var y = months.getFullYear();
8
9console.log(d + "-" + m + "-" + y);