diff --git a/README.md b/README.md index 2f131cd54..6c0aebb86 100644 --- a/README.md +++ b/README.md @@ -2605,6 +2605,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 332363464..df086191a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1248,6 +1248,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 0f705109c..fc588dbbf 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -38,6 +38,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);