Created
February 7, 2021 16:15
-
-
Save hasangenc0/5cdd6647e9509971ac4ee24954d7cb94 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