Evening challenges for the functions module.
Define a function maxOrMin
that takes three parameters: two numbers and a boolean. Have it return the larger of the two numbers if the boolean is true, otherwise have it return the lesser of the numbers.
Write a function that takes an array of numbers and returns the sum of each number multiplied by its index.
count += (number * index)
Create a function called numSquare that will return an array of all perfect square numbers up to, but not exceeding a max number.
Create a function that returns true if the number passed in is a prime number and false if not.
Using your isPrime function, create a function primes that will return an array of all prime numbers up to, but not exceeding a max number.