Skip to content

Instantly share code, notes, and snippets.

@HiroAgustin
Created January 23, 2020 17:23
Show Gist options
  • Select an option

  • Save HiroAgustin/c33d1a10c5e1a799ac282576de97641a to your computer and use it in GitHub Desktop.

Select an option

Save HiroAgustin/c33d1a10c5e1a799ac282576de97641a to your computer and use it in GitHub Desktop.
function isFactorial(number) {
let total = counter = 1
while (total < number)
total *= counter++
return total === number
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment