Create a function that takes an array of numbers nums as an argument. Square each number in the array if the number is even and square root √ the number if it is odd.
Return the sum of the new array rounded to two decimal places.
Example:
[2, 4, 9] ➞ 23
2 ^ 2 + 4 ^ 2 + √9 = 4 + 16 + 3 = 23
arraySum([1, 3, 3, 1, 10]) ➞ 105.46
arraySum([2, 3, 4, 5]) ➞ 23.97
arraySum([1, 31, 3, 11, 0]) ➞ 11.62