Skip to content

Instantly share code, notes, and snippets.

@tacitphoenix
Created November 15, 2019 19:22
Show Gist options
  • Save tacitphoenix/d8450a03845ef4f9a98aef316de243a9 to your computer and use it in GitHub Desktop.
Save tacitphoenix/d8450a03845ef4f9a98aef316de243a9 to your computer and use it in GitHub Desktop.
Nice to have wrapper utility functions wrapped around core libraries
const randNum = (n) => Math.floor(Math.random() * n) + 1;
const makeArr = (n) => Array.from(Array(n)).map(() => 0);
const seqFn = (fn) => makeArr(20).map(() => fn());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment