From b92ea2c36eee2779fcbaf2b82e29b72456a12245 Mon Sep 17 00:00:00 2001 From: Luiz F Picolo Date: Fri, 26 Jan 2024 03:20:24 +0000 Subject: [PATCH] Add index.js --- index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..b4755d9 --- /dev/null +++ b/index.js @@ -0,0 +1,9 @@ + +var cells = document.querySelectorAll('#proposta_trabalho tbody td:nth-child(3)'); +var soma = 0; + +cells.forEach(function(cell) { + soma += parseInt(cell.textContent); +}); + +console.log('A soma do campo "Nº aulas" é:', soma); \ No newline at end of file