diff --git a/README.md b/README.md index 12b73701d..4e0a0218b 100644 --- a/README.md +++ b/README.md @@ -4090,7 +4090,8 @@ const average = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0) average([1, 2, 3]); // 2 ``` -[⬆ back to top](#table-of-contents) +
[⬆ back to top](#table-of-contents) + ### max @@ -4105,6 +4106,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va + const max = (...arr) => Math.max(...[].concat(...arr); ``` @@ -4112,7 +4114,8 @@ const max = (...arr) => Math.max(...[].concat(...arr); max([10, 1, 5]); // 10 ``` -[⬆ back to top](#table-of-contents) +
[⬆ back to top](#table-of-contents) + ### min @@ -4128,7 +4131,8 @@ const min = arr => Math.min(...[].concat(...arr)); min([10, 1, 5]); // 1 ``` -[⬆ back to top](#table-of-contents) +
[⬆ back to top](#table-of-contents) + ### sum @@ -4144,7 +4148,8 @@ const sum = (...arr) => [].concat(...arr).reduce((acc, val) => acc + val, 0); sum([1, 2, 3, 4]); // 10 ``` -[⬆ back to top](#table-of-contents) +
[⬆ back to top](#table-of-contents) + ## Credits diff --git a/docs/index.html b/docs/index.html index fd39cde22..1a2f482cc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1827,6 +1827,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 8cf3153ff..a4c558f87 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -11,6 +11,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
 
 
 
+
 const max = (...arr) => Math.max(...[].concat(...arr);
 ```