Skip to content

Instantly share code, notes, and snippets.

@brunocarvalhodearaujo
Last active November 28, 2016 13:29
Show Gist options
  • Save brunocarvalhodearaujo/81870679af9e12f6d3b5 to your computer and use it in GitHub Desktop.
Save brunocarvalhodearaujo/81870679af9e12f6d3b5 to your computer and use it in GitHub Desktop.
Fatorial de um numero
function factorial(number) {
var result = 1
do {
result = result * number
number--
} while (number > 0)
return result
}
console.log(factorial(7))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment