Try Kotlin (Ajax version)
Run Kotlin
file name:
fun main(args: Array
) { val ret = factorial(10) println("Hello, World! $ret") } fun factorial(num: Int): Long { if (num == 0) return 1 else return num * factorial(num - 1) }
result ↓↓↓: