Skip to content

Instantly share code, notes, and snippets.

@mwiegant
Created September 23, 2015 21:47
Show Gist options
  • Save mwiegant/619cb4df133842ae6415 to your computer and use it in GitHub Desktop.
Save mwiegant/619cb4df133842ae6415 to your computer and use it in GitHub Desktop.
How to pre-load an array with values
const Month JAN ( 0, "JAN" );
const Month FEB ( 1, "FEB" );
const Month MAR ( 2, "MAR" );
const Month APR ( 3, "APR" );
const Month MAY ( 4, "MAY" );
const Month JUN ( 5, "JUN" );
const Month JUL ( 6, "JUL" );
const Month AUG ( 7, "AUG" );
const Month SEP ( 8, "SEP" );
const Month OCT ( 9, "OCT" );
const Month NOV ( 10, "NOV" );
const Month DEC ( 11, "DEC" );
const Month YEAR[12] = { JAN, FEB, MAR, APR, MAY, JUN,
JUL, AUG, SEP, OCT, NOV, DEC };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment