From 001adef5b8852a562a3bfb7c69033140389dddd9 Mon Sep 17 00:00:00 2001 From: email Date: Thu, 3 Aug 2023 11:45:21 +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..01b3963e 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');