Skip to content

Instantly share code, notes, and snippets.

@paulocanedo
Last active August 17, 2023 21:38
Show Gist options
  • Save paulocanedo/e86ff1e8f44c35e340d6ba9f4cddab70 to your computer and use it in GitHub Desktop.
Save paulocanedo/e86ff1e8f44c35e340d6ba9f4cddab70 to your computer and use it in GitHub Desktop.
let resultado = [3,5,9,40,42,47];
let validarNumerosMegaSena = (resultado, nodes) => {
for(let c of nodes) {
let n = Number.parseInt(c.textContent);
if(resultado.indexOf(n) >= 0) { c.style.backgroundColor = 'yellow' }
}
}
let nodes = document.querySelectorAll('#tabelaApostas tbody tr celula-prognostico span.margemVolante');
validarNumerosMegaSena(resultado, nodes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment