diff --git a/Solutions/6-matrix.js b/Solutions/6-matrix.js index 78369e8..656bb9c 100644 --- a/Solutions/6-matrix.js +++ b/Solutions/6-matrix.js @@ -12,4 +12,8 @@ const max = matrix => { return value; }; +/* one-line solution +const max = matrix => Math.max(...matrix.flat()) +*/ + module.exports = { max };