0
/ 10
Complete the function countNegatives()
so that it counts of negative values in the array numbers
. You may assume that the array has some...
Complete the function countNegatives()
so that it counts of negative values in the array numbers
. You may assume that the array has some elements.
Examples:
countNegatives({1,2,3}) -> 0
countNegatives({4,-5}) -> 1
Your feedback will appear here when you check your answer.