You are given an array arrayOfNumbers
which contains a series of numbers.
Create a function arrayOperationsNumber
that accepts arrayOfNumbers
as a parameter and performs the following operations,
- Logs the sum of all numbers in the given array to the console.
- Creates a new array from given array containing only elements that are multiples of 3.
- Creates a new array from given array containing only even numbers and logs it to the console.
- Creates a new array from given array that contains true for even numbers and false for odd numbers then logs it to the console.
For example: