Posts by MARCOS • 1 point
1 post
-
-2
votes6
answers1784
viewsA: Quantifying negative values in an array
var listaDeGanhos = [10, 30, -10, -5, -1, 40] var totalNegativos = 0 for ( var i = 0; i < listaDeGanhos.length; i++){ if ( listaDeGanhos[i] < 0 ) totalNegativos++ …
javascriptanswered MARCOS 1