phone challenge 1
by Fabio Dan
JavaScript
// please write a function that takes an array of numbers and returns an array of booleans indicating whether the number is even or not
// no outside resources, you CAN use the debugger tools
// [2, 5, 8, 9, 11] => [true, false, true, false, false]
// [88, 4, -2, 7, 40] => [true, true, true, false, true]
function oddOrEven(num){
var arrayreturs = [];
for(i=0;i<num.length;i++){
if(num[i] % 2 == 0){
arrayreturs.push(true);
}
else{
arrayreturs.push(false);
}
}
return arrayreturs;
}
var x = [88, 4, -2, 7, 40]
console.log(oddOrEven(x));