Write me a function in JavaScript that takes an array of 5 numbers as input and checks if any of the numbers is a valid prime number, if it is print the number to the console.
Here's a JavaScript function that takes an array of 5 numbers as input, checks if any of the numbers is a valid prime number, and prints the number to the console if it is:

```javascript
function checkForPrime(arr) {
  for (let i = 0; i < arr.length; i++) {
    let isPrime = true;
    if (arr[i] < 2) {
      isPrime = false;
    } else {
      for (let j = 2; j <= Math.sqrt(arr[i]); j++) {
        if (arr[i] % j === 0) {
          isPrime = false;
          break;
        }
      }
    }
    if (isPrime) {
      console.log(arr[i]);
    }
  }
}
```

In this function, we use a loop to iterate through the array and check each number to see if it is a prime number. We start by assuming that each number is prime, but if we find a factor for a number, then we set a flag to false and break out of the inner loop. If the flag is still true at the end of the inner loop, then we know that the number is prime, so we print it to the console.

To use this function, you can pass an array of 5 numbers as an argument, like this:

```javascript
let arr = [2, 3, 4, 5, 6];
checkForPrime(arr); // prints 2, 3, and 5 to the console
```

This will print any valid prime numbers in the array to the console.