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