From fd736c66601e1e27bf9e0a9aaa040baee33404bf Mon Sep 17 00:00:00 2001 From: shadefinale Date: Sat, 7 Nov 2015 23:37:17 -0600 Subject: [PATCH] Test solution. --- solution.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 +}());