diff --git a/README.md b/README.md index 3ffec3b78..5e1d52fee 100644 --- a/README.md +++ b/README.md @@ -2689,6 +2689,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 c9bb23101..1538f28a6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1241,6 +1241,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 879bd05b6..50b4c1c5f 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -31,6 +31,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);