diff --git a/README.md b/README.md index 68e33da96..f4b8d1642 100644 --- a/README.md +++ b/README.md @@ -2620,6 +2620,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 c36cf03e6..646106e90 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1263,6 +1263,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 91d5bb44c..c2293755d 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -53,6 +53,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);