Posts by Lucas Medeiros • 1 point
1 post
-
0
votes1
answer25
viewsQ: I want to make a function that receives a parameter n and returns the sum value of all terms from 1 to n
I did it, but it’s not working: function a(n) { for (var contador = 0; contador <= n; contador++) { var soma = soma + contador; return soma; } }…
javascriptasked Lucas Medeiros 1