题解 | #阶乘#
阶乘
https://www.nowcoder.com/practice/39fcf876fab34fe8afc298de10a1e112
{"html":"<!-- 请在此处编写你的代码 -->\\n<!-- <div id=\"app\"> Hello Nowcoder </div> -->","css":"/* html, body {\\n\\twidth: 100%;\\n\\theight: 100%;\\n\\tmargin: 0;\\n\\tpadding: 0;\\n} */","js":"function _factorial(number) {\r\n // 补全代码\r\n for(i=number;i>=0;i--){\r\n if(i==0){\r\n return 0\r\n }\r\n if(i==1){\r\n return 1\r\n }\r\n return number *=number-1\r\n }\r\n}"}