diff --git a/README.md b/README.md index 019f87b84..9209e5373 100644 --- a/README.md +++ b/README.md @@ -2612,6 +2612,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 13cc9e599..bc7f53f83 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1255,6 +1255,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 dc9fdca0c..aaf49a05e 100644 --- a/snippets/max.md +++ b/snippets/max.md @@ -45,6 +45,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr);