diff --git a/README.md b/README.md index 7f438c88e..985e42a46 100644 --- a/README.md +++ b/README.md @@ -4120,6 +4120,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 fa0c4f729..7ab4b5e0a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1841,6 +1841,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 e01ff3e6e..4ea329bbc 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -25,6 +25,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);