diff --git a/README.md b/README.md index 571fe3ad3..cacc20a02 100644 --- a/README.md +++ b/README.md @@ -2607,6 +2607,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 7aac36b7d..79ab4d7a1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1250,6 +1250,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 1430c59b3..fab169188 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -40,6 +40,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);