diff --git a/README.md b/README.md index 07b319f29..7a9b3710f 100644 --- a/README.md +++ b/README.md @@ -2610,6 +2610,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 6b9e568f9..96b59c008 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1253,6 +1253,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 1d120682a..deab49958 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -43,6 +43,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);