Skip to content

Instantly share code, notes, and snippets.

@benergize
Created May 5, 2020 19:06
Show Gist options
  • Save benergize/1c594e1f898bb38b98fa42508fdff35d to your computer and use it in GitHub Desktop.
Save benergize/1c594e1f898bb38b98fa42508fdff35d to your computer and use it in GitHub Desktop.
Days in each month in JS as array and object
const monthObject = {
"January":31,
"February":28,
"March":31,
"April":30,
"May":31,
"June":30,
"July":31,
"August":31,
"September":30,
"October":31,
"November":30,
"December":31
};
const monthArray = [
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
];
@benergize
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment