diff --git a/README.md b/README.md index cacc20a02..12cc43033 100644 --- a/README.md +++ b/README.md @@ -2608,6 +2608,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 79ab4d7a1..21b72c2fb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1251,6 +1251,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 fab169188..493b56044 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -41,6 +41,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);