diff --git a/README.md b/README.md index 066eb0df3..22ed83bdb 100644 --- a/README.md +++ b/README.md @@ -2693,6 +2693,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 04dd2b420..956610134 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1245,6 +1245,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 37b235214..6481b2565 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -35,6 +35,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);