From 9bcdc168469976dcba410cdc0ab36d2d2edca0a2 Mon Sep 17 00:00:00 2001
From: Travis CI Number() to check if the coercion holds.
Returns the maximum value out of two or more numbers/arrays.
Use Math.max() combined with the spread operator (...) to get the maximum value in the array.
+
const max = (...arr) => Math.max(...[].concat(...arr);
max([10, 1, 5]); // 10
diff --git a/snippets/max.md b/snippets/max.md
index c90c6d655..7c09c9725 100644
--- a/snippets/max.md
+++ b/snippets/max.md
@@ -6,6 +6,7 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
```js
+
const max = (...arr) => Math.max(...[].concat(...arr);
```