Conditions in loops in JavaScript

You can use conditions in loops. Let's look at an example. Let's say we have the following array:

javascriptlet arr = [1, 2, 3, 4, 5];

Let's print all the elements of this array to the console:

javascriptfor (let elem of arr) {
  console.log(elem);
}

And now we will impose a condition and will display only elements that are even numbers:

javascriptfor (let elem of arr) {
  if (elem % 2 === 0) {
    console.log(elem);
  }
}
Задание 1

Given the following array:

javascriptlet arr = [2, 5, 9, 15, 1, 4];

Print to the console those array elements that are greater than 3, but less than 10.

Задание 2

Given the following object:

javascriptlet obj = {a: 1, b: 2, c: 3, d: 4, e: 5};

Print to the console those object elements whose values are odd numbers.