Skip to content

Instantly share code, notes, and snippets.

@cbrevik
Last active December 1, 2016 13:37
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 cbrevik/95b241380bc18889babc5dd71ea9914f to your computer and use it in GitHub Desktop.
Save cbrevik/95b241380bc18889babc5dd71ea9914f to your computer and use it in GitHub Desktop.
Uten noe jukse string-splitting
function f(s) {return Math.floor((s*4) / Math.pow(10, Math.floor(Math.log10(s*4)))) == 6 ? s : f(((s*4) % Math.pow(10, Math.floor(Math.log10(s*4)))) * 10 + 6)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment