Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setInterval(function(){
- var tempo = document.getElementById("tempo").innerText;
- var match = tempo.match(/[^\d](\d+)/);
- var nr = match && match[1];
- var verm = document.getElementById("verm").innerText;
- verm = verm.replace(" ","");
- verm = parseInt(verm);
- var preto = document.getElementById("preto").innerText;
- preto = preto.replace(" ","");
- preto = parseInt(preto);
- if(nr == 3){
- if(verm>preto){
- console.log("O Vermelho é maior");
- console.log(verm);
- console.log(preto);
- }else{
- console.log("O Preto é maior");
- console.log(verm);
- console.log(preto);
- }
- }
- console.log(nr);
- }, 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement