Created
February 26, 2018 07:24
-
-
Save alexmasyukov/dd7e7bb62b1e260a11b065456d50b99b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compute_sum: if (matrix) { | |
for(var x = 0; x < matrix.length; x++) { | |
var row = matrix[x]; | |
if (!row) break compute_sum; | |
for(var y = 0; y < row.length; y++) { | |
var cell = row[y]; | |
if (isNaN(cell)) break compute_sum; | |
sum += cell; | |
} | |
} | |
success = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment