From 7117381fe5169b7f8f2b465b65eb883d95346386 Mon Sep 17 00:00:00 2001 From: manjuu-eater <88940383+manjuu-eater@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:29:09 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9B=96=E6=98=A7=E3=81=AA=E8=A1=A8=E7=8F=BE?= =?UTF-8?q?=E3=82=92=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 小数点以下を「丸める」⇒「切り捨てる」と明記 --- .../javascript/reference/global_objects/string/repeat/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/ja/web/javascript/reference/global_objects/string/repeat/index.md b/files/ja/web/javascript/reference/global_objects/string/repeat/index.md index baaf83b53fe381..081917ddac6447 100644 --- a/files/ja/web/javascript/reference/global_objects/string/repeat/index.md +++ b/files/ja/web/javascript/reference/global_objects/string/repeat/index.md @@ -40,7 +40,7 @@ repeat(count) "abc".repeat(0); // '' "abc".repeat(1); // 'abc' "abc".repeat(2); // 'abcabc' -"abc".repeat(3.5); // 'abcabcabc' (小数は丸められ、整数の結果が返されます) +"abc".repeat(3.5); // 'abcabcabc' (小数点以下は切り捨てられます) "abc".repeat(1 / 0); // RangeError ({ toString: () => "abc", repeat: String.prototype.repeat }).repeat(2);