Custom Math.pow
'use strict';
const pow = (base, exponent) => {
const arr = Array.apply(null, Array(exponent));
return arr.map(() => base).reduce((total, int) => total * int, 1);
};
console.log(pow(10, 3));
INFO
'use strict';
const pow = (base, exponent) => {
const arr = Array.apply(null, Array(exponent));
return arr.map(() => base).reduce((total, int) => total * int, 1);
};
console.log(pow(10, 3));