Write the function divideArray in script. js that has a single numbers parameter containing an array of integers. The function

Write the function divideArray in script. js that has a single numbers parameter containing an array of integers. The function should divide numbers into two arrays, evenNums for even numbers and oddNums for odd numbers. Then the function should sort the two arrays and output the array values to the console. Ex: The function call:

Leave a Reply

Your email address will not be published. Required fields are marked *