// Given an integer, write a function to determine if it is a power of three.

var isPowerOfThree = function(n) {
    return Math.log10(n) / Math.log10(3) % 1 === 0;
};

@@ -162,8 +162,99 @@
 = 0;%0A%7D;%0A
+%0Avar isPowerOfThree = function(n) %7B%0A    return n.toString(3).replace(/0/g, '') === '1';%0A%7D;%0A

add solution