aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/de/web/javascript/reference/global_objects/math/max/index.html2
-rw-r--r--files/ja/web/javascript/reference/global_objects/math/max/index.html2
-rw-r--r--files/ko/web/javascript/reference/global_objects/math/max/index.html2
-rw-r--r--files/pt-br/web/javascript/reference/global_objects/math/max/index.html2
-rw-r--r--files/zh-tw/web/javascript/reference/global_objects/math/max/index.html2
5 files changed, 5 insertions, 5 deletions
diff --git a/files/de/web/javascript/reference/global_objects/math/max/index.html b/files/de/web/javascript/reference/global_objects/math/max/index.html
index 426bf6abad..15d0981aa1 100644
--- a/files/de/web/javascript/reference/global_objects/math/max/index.html
+++ b/files/de/web/javascript/reference/global_objects/math/max/index.html
@@ -55,7 +55,7 @@ Math.max(-10, 20); // 20
<pre class="brush: js">var arr = [1, 2, 3];
var max = arr.reduce(function(a, b) {
return Math.max(a, b);
-});
+}, -Infinity);
</pre>
<p>Die folgende Funktion benutzt {{jsxref("Function.prototype.apply()")}}, um den maximalen Wert eines numerischen Arrays zu finden. <code>getMaxOfArray([1, 2, 3])</code> entspricht <code>Math.max(1, 2, 3)</code>, aber <code>getMaxOfArray()</code> kann programmatisch erstellte Arrays jeder Art annehmen.</p>
diff --git a/files/ja/web/javascript/reference/global_objects/math/max/index.html b/files/ja/web/javascript/reference/global_objects/math/max/index.html
index e650c30f15..afd2433e13 100644
--- a/files/ja/web/javascript/reference/global_objects/math/max/index.html
+++ b/files/ja/web/javascript/reference/global_objects/math/max/index.html
@@ -55,7 +55,7 @@ Math.max(-10, 20); // 20
<pre class="brush: js notranslate">var arr = [1,2,3];
var max = arr.reduce(function(a, b) {
return Math.max(a, b);
-});
+}, -Infinity);
</pre>
<p>次の関数では {{jsxref("Function.prototype.apply()")}} を使用して配列の最大値を取得します。 <code>getMaxOfArray([1, 2, 3])</code> は <code>Math.max(1, 2, 3)</code> と同等ですが、 <code>getMaxOfArray()</code> はプログラム的に構築された配列に使用することができます。これは比較的要素が少ない配列に対して使用してください。</p>
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
<pre class="brush: js">var arr = [1,2,3];
var max = arr.reduce(function(a, b) {
return Math.max(a, b);
-});
+}, -Infinity);
</pre>
<p>다음 함수는 {{jsxref ( "Function.prototype.apply ()")}}을 사용하여 숫자 배열에서 최대 요소를 찾습니다. <code>getMaxOfArray([1, 2, 3])</code>는
diff --git a/files/pt-br/web/javascript/reference/global_objects/math/max/index.html b/files/pt-br/web/javascript/reference/global_objects/math/max/index.html
index b28723014f..b294467920 100644
--- a/files/pt-br/web/javascript/reference/global_objects/math/max/index.html
+++ b/files/pt-br/web/javascript/reference/global_objects/math/max/index.html
@@ -52,7 +52,7 @@ Math.max(-10, 20); // 20
<pre class="brush: js">var arr = [1, 2, 3];
var max = arr.reduce(function(a, b) {
return Math.max(a, b);
-});</pre>
+}, -Infinity);</pre>
<p>A função a seguir utiliza {{jsxref("Function.prototype.apply()")}} para encontrar o elemento de maior valor dentro do array. <code>getMaxOfArray([1,2,3])</code> é equivalente a <code>Math.max(1, 2, 3)</code>, mas você pode usar <code>getMaxOfArray</code>  em arrays construídos programaticamente e o ideal é utilizá-la somente em arrays com relativamente poucos elementos.</p>
diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/max/index.html b/files/zh-tw/web/javascript/reference/global_objects/math/max/index.html
index d334c6bc02..a3e994c734 100644
--- a/files/zh-tw/web/javascript/reference/global_objects/math/max/index.html
+++ b/files/zh-tw/web/javascript/reference/global_objects/math/max/index.html
@@ -55,7 +55,7 @@ Math.max(-10, 20); // 20
<pre class="brush: js">var arr = [1,2,3];
var max = arr.reduce(function(a, b) {
  return Math.max(a, b);
-});
+}, -Infinity);
</pre>
<p>The following function uses {{jsxref("Function.prototype.apply()")}} to get the maximum of an array. <code>getMaxOfArray([1, 2, 3])</code> is equivalent to <code>Math.max(1, 2, 3)</code>, but you can use <code>getMaxOfArray()</code> on programmatically constructed arrays. This should only be used for arrays with relatively few elements.</p>