You are given an array of prime factors arr and a target. When each number in the array is raised to an appropriate power their product will be equal to the target.
Your role is to return the exponents. All these arrays will have a length of three. Basically, it is three numbers whose product is equal to challenge. The only difference is what you are expected to return.
productEqualTarget([2, 3, 5], 600) ➞ [3, 1, 2]
// Because 2^3*3^1*5^2 = 600
productEqualTarget([2, 3, 5], 720) ➞ [4, 2, 1]
// Because 2^4*3^2*5^1 = 720