Given a 4 by 4 matrix:
10 45 90 11
23 68 29 09
49 39 23 78
46 92 21 90
Find the largest multiple of 3 consecutive numbers that are in a line:
*For the first horizontal line, the two multiples are 10 * 45 * 90, or 45 * 90 * 11
*This applies to horizontal, vertical, and diagonal lines.
window.items = [[10, 45, 90, 11],[23,68, 29, 9],[49, 39, 23, 78], [46, 92, 21, 90]]; window.items2 = [[34, 84, 75, 35],[55,21,89,36],[75,95,35,64], [25,45,95,49]]; window.find_largest = function(square) { } //Your answer should match these strings console.log(find_largest(items)===299880); console.log(find_largest(items2)===496375);