diff --git a/README.md b/README.md index 6c0aebb86..571fe3ad3 100644 --- a/README.md +++ b/README.md @@ -2606,6 +2606,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/docs/index.html b/docs/index.html index df086191a..7aac36b7d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1249,6 +1249,7 @@ lcm([1, 3, 4], 5); // 60 + const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/snippets/max.md b/snippets/max.md index fc588dbbf..1430c59b3 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -39,6 +39,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);