Skip to content

Commit 8d1f9a8

Browse files
committed
Merge branch 'master' of github.com:PaulNoth/codewars
2 parents 805d274 + e4152cb commit 8d1f9a8

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import java.util.Arrays;
2+
3+
public class EvenNumbers {
4+
public static int[] divisibleBy(int[] numbers, int divider) {
5+
return Arrays.stream(numbers).filter(num -> num % divider == 0).toArray();
6+
}
7+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function divisibleBy(numbers, divisor) {
2+
return numbers.filter(num => num % divisor === 0);
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def divisible_by(numbers, divisor)
2+
numbers.select {|num| num % divisor == 0}
3+
end

0 commit comments

Comments
 (0)