Posts by Ivair_Quirino_CV Santos • 21 points
2 posts
-
0
votes0
answers11
viewsQ: With iterating an array within an object?
My question is whether this way of using is correct, or whether it has a more viable way to have the same result. /* Função retorna alunos>12 anos como adultos e alunos== 12 como crianças*/…
javascriptasked Ivair_Quirino_CV Santos 21 -
2
votes3
answers105
viewsQ: How to change the value of a variable with a function?
var x = 2 function alterar(x) { return x += 2 } alterar(x) console.log(x) console.log(alterar(x)) Why the variable x doesn’t change the value? It only changes when I call the function, but then it…