DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
how to write a factorial function in javascript
function factorial(num){ return num === 1 ? 1 : num * factorial(num - 1) }
Source by 1loc.dev #
PREVIOUS
NEXT
Tagged:
#write
#factorial
#function
#javascript
ADD COMMENT
Topic
COMMENT
Name
8+6 =
Submit