Hacker News new | ask | show | jobs
by rahimnathwani 3021 days ago
0! == 1

EDIT: Oops. As pointed out below, the code is indeed incorrect, and my comment is irrelevant.

1 comments

True, but irrelevant. For all values of n > 1, that function will return 1, which is clearly not what the author intended.