Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get odd number in array

public int[] findEvens() {
  int numberEvens = 0;
  for (int i = 0; i < numbers.length; i++) {
     if (numbers[i] % 2 == 0) {
        numberEvens++;
     }
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #odd #number #array
ADD COMMENT
Topic
Name
5+1 =