Skip to content

Instantly share code, notes, and snippets.

@FredrikAugust
Created July 23, 2018 13:53
Show Gist options
  • Save FredrikAugust/0c198f6134d3413339b0cd049dcf7d92 to your computer and use it in GitHub Desktop.
Save FredrikAugust/0c198f6134d3413339b0cd049dcf7d92 to your computer and use it in GitHub Desktop.
Golfed validator of check digit in ISBN (67 characters)
v=i=>(!(eval(i.split('').map((e,i)=>(e*[1,3][i%2])).join('+'))%10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment