From 578deed1a127734f334fa82ec0eccbbd0d8382d8 Mon Sep 17 00:00:00 2001 From: greencurry <56ne.work@gmail.com> Date: Sat, 24 Sep 2022 20:57:36 +0900 Subject: [PATCH] =?UTF-8?q?=E9=9A=8E=E4=B9=97=E9=96=A2=E6=95=B0=E3=81=AE?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index ab9c9ba8..69e9fb36 100644 --- a/app.js +++ b/app.js @@ -7,7 +7,9 @@ */ function factorial(n) { let result = 1; - // TODO このコメントを消して正しく実装してください。 + for (let i = 1; i <= n; i++) { + result = result * i; + } return result; } const assert = require('assert');