diff --git a/README.md b/README.md index b9b6590a3..ab9dd9119 100644 --- a/README.md +++ b/README.md @@ -2615,6 +2615,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 c15d38bbb..e9eba81a5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1258,6 +1258,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 37ea0f131..4a9c598e7 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -48,6 +48,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);