Created
February 7, 2021 14:13
-
-
Save hasangenc0/d3fce1b488bd5c19250ac84ff52746fd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
table = document.querySelector("table"); | |
sum = 0; | |
for (var i = 0, row; row = table.rows[i]; i++) { | |
for (var j = 0, col; col = row.cells[j]; j++) { | |
if (j ==2 && i > 0) { | |
sum += Number(col.innerHTML.replaceAll(',', '')); | |
} | |
} | |
} | |
console.log({sum}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment