From 48775b07d0867f298e78553cde9b5fbafc03549f Mon Sep 17 00:00:00 2001 From: Tomoyuki Hata <7702653+hata6502@users.noreply.github.com> Date: Tue, 25 Jan 2022 11:36:09 +0900 Subject: Fix Math.max() initial value to -Infinity --- files/ko/web/javascript/reference/global_objects/math/max/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/ko') diff --git a/files/ko/web/javascript/reference/global_objects/math/max/index.html b/files/ko/web/javascript/reference/global_objects/math/max/index.html index 439aebe905..a90570b4c4 100644 --- a/files/ko/web/javascript/reference/global_objects/math/max/index.html +++ b/files/ko/web/javascript/reference/global_objects/math/max/index.html @@ -70,7 +70,7 @@ Math.max(-10, 20); // 20
var arr = [1,2,3]; var max = arr.reduce(function(a, b) { return Math.max(a, b); -}); +}, -Infinity);
다음 함수는 {{jsxref ( "Function.prototype.apply ()")}}을 사용하여 숫자 배열에서 최대 요소를 찾습니다. getMaxOfArray([1, 2, 3])
는
--
cgit v1.2.3-54-g00ecf