+ 1

A number a is a power of b if it is divisible by b and a/b is a power of b write a function called is_power

5th May 2021, 7:30 PM
Maureen Muiru
Maureen Muiru - avatar
2 Answers
+ 1
You have to provide some test cases so i can check my answer but from your description, i think a number 2 is the power of 5 if console.log(((a,b) => !(a%b)&&!((a/b)%b))(2,5));
5th May 2021, 7:43 PM
Mirielle - avatar
Show as your attempt
5th May 2021, 7:31 PM
Matthias - avatar