var arr = [-2, 5, 3, 0, -4, 8]; var positives = 0; var negatives = 0; var zeros = 0; for (var i=0; i<arr.length; i++) { if (arr[i] > 0) { positives++; } else if (arr[i] < 0) { negatives++; } else { zeros++; } } write("Number of positive values = " + positives + "\n"); write("Number of negative values = " + negatives + "\n"); write("Number of zero values = " + zeros);
(
)
{
}
[
]
"
;
=
+
-
*
!
/
%
&
|