Posts by Herbert Pereira • 11 points
1 post
-
1
votes8
answers3758
viewsA: Exercise taking the position of the array
Follows a solution successfully executed: function medalhaDeAcordoComPosto(numero){ var posto=["ouro","prata","bronze","nada"]; var posicao=numero-1; if (numero ==0 || numero >= posto.length){…