diff --git a/README.md b/README.md index ab1608e3d..066eb0df3 100644 --- a/README.md +++ b/README.md @@ -2692,6 +2692,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 4068be7a2..04dd2b420 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1244,6 +1244,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 a2188fd48..37b235214 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -34,6 +34,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);