Posts by Ian Ribeiro • 33 points
1 post
-
3
votes2
answers64
viewsQ: Is declaring variable receiving element of a vector within a for a good practice or is it unnecessary?
//code 1 var pacientes = document.querySelectorAll(".paciente"); for(var i = 0; i < pacientes.length; i++){ var paciente = pacientes[i]; //linha desnecessária…