const power = (num, exp) => !exp ? 1 : new Array(exp).fill(num).reduce((a , b) => a * b)
function power(num,exp){if(exp === 0){return 1;}if(exp % 2 === 0){let half = Math.floor(exp/2)return power(num, half) * power(num, half);}else{let half = Math.floor((exp-1)/2)return num * power(num, half) * power(num, half);}}- const power = (num, exp) => !exp ? 1 : new Array(exp).fill(num).reduce((a , b) => a * b)