Advertisement
elena1234

Find Max Element - JavaScript

Aug 17th, 2021 (edited)
1,164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function findBiggestElement(matrix){
  2.     let max = Math.max(...[].concat(...matrix));
  3.     console.log(max);
  4.     }
  5.  
  6. findBiggestElement([[20, 50, 10],
  7. [8, 33, 145]])
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement