diff --git a/README.md b/README.md index af30ad301..89ba6ed73 100644 --- a/README.md +++ b/README.md @@ -4114,6 +4114,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 b7c36276c..8fc47ae44 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1835,6 +1835,7 @@ Use Number() to check if the coercion holds.

+ const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index c422b86fb..3265868b9 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -19,6 +19,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```