diff --git a/README.md b/README.md index 985e42a46..db1f85bd4 100644 --- a/README.md +++ b/README.md @@ -4121,6 +4121,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 7ab4b5e0a..f93c91b7a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1842,6 +1842,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr); diff --git a/snippets/max.md b/snippets/max.md index 4ea329bbc..d3afdb320 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -26,6 +26,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);