Skip to content

Instantly share code, notes, and snippets.

@cherihung
Last active July 21, 2017 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cherihung/ea2f063e543da4fd8d8d314fe57b03af to your computer and use it in GitHub Desktop.
Save cherihung/ea2f063e543da4fd8d8d314fe57b03af to your computer and use it in GitHub Desktop.
generate string array of time units
const _generator = i => {
return i < 9 ? '0'+(i+1) : (i+1).toString();
};
const UNITS = Array.from({length: 60}, (v, i) => {
return _generator(i);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment