Skip to content

Instantly share code, notes, and snippets.

@oldj
Last active Apr 10, 2017
Embed
What would you like to do?
计算阶乘
new Array(10)
.fill(0).map((_, i) => i)
.reduce((p, c, i) => p * (i + 1), 1); // 3628800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment