diff --git a/README.md b/README.md index 5e1d52fee..659ddc65c 100644 --- a/README.md +++ b/README.md @@ -2690,6 +2690,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 1538f28a6..d1a63f68a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1242,6 +1242,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 50b4c1c5f..9208ee8eb 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -32,6 +32,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);