Skip to content

Instantly share code, notes, and snippets.

@xiaoyunyang
Last active February 3, 2018 03:21
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 xiaoyunyang/5b4e534ee848a7def9ba71bd8b9f5945 to your computer and use it in GitHub Desktop.
Save xiaoyunyang/5b4e534ee848a7def9ba71bd8b9f5945 to your computer and use it in GitHub Desktop.
Untestable Code Test
let vals = Array.from({length: 13}, (v,i) => i)
//> (13) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
vals = vals.map(v => v-1)
//> (13) [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
let res = vals.map(v => (
{val: v, notDisabled: valIncrementer(v, false), disabled: valIncrementer(v, true) }
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment