diff --git a/solution.js b/solution.js index 2549e32..214dd40 100644 --- a/solution.js +++ b/solution.js @@ -1,8 +1,10 @@ Solution = (function() { return { isRotation: function(str1, str2) { - //your solution goes here - return 'missing implementation'; - } + if (str1.length == 0) return false; + if (str1.length != str2.length) return false; + return (str1 + str1).indexOf(str2) >= 0; + } + } -}()); \ No newline at end of file +}());