diff --git a/README.md b/README.md index d5643b471..e8159d7a8 100644 --- a/README.md +++ b/README.md @@ -2618,6 +2618,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 cf89a0d90..444543529 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1261,6 +1261,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 1b2ea58c4..eb5e76d0d 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -51,6 +51,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);