diff options
author | Tomoyuki Hata <7702653+hata6502@users.noreply.github.com> | 2022-01-25 11:36:09 +0900 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 00:04:17 +0800 |
commit | 48775b07d0867f298e78553cde9b5fbafc03549f (patch) | |
tree | 615454d3b26b989444b45aa2324d14d959f9662f /files/de | |
parent | 76c2fdbe9ccc65244df60929fa17bce3ebc70117 (diff) | |
download | translated-content-48775b07d0867f298e78553cde9b5fbafc03549f.tar.gz translated-content-48775b07d0867f298e78553cde9b5fbafc03549f.tar.bz2 translated-content-48775b07d0867f298e78553cde9b5fbafc03549f.zip |
Fix Math.max() initial value to -Infinity
Diffstat (limited to 'files/de')
-rw-r--r-- | files/de/web/javascript/reference/global_objects/math/max/index.html | 2 |
1 files changed, 1 insertions, 1 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> |