this is genius
1 rotation to the left === (s.length-1) rotations to the right though..
I feel like the precision in the kata description was more of a context clue, to not get devs confused as to what exactly the author was referring to with the word 'rotation'
This comment is hidden because it contains spoiler information about the solution
it evaluates to true or false but as they are truthy/falsy values it works just as same as 1 or 0
does (==) return either a 1 or 0?
Can someone explain this a bit to me?
I do not understand!
What is big O for this solution?
I thing it's a bad practice that not declare variables. It may become major issue in ton of code.
Or the loop counter.
Your solution is using a library?
How is it the best practice?
=== evaluates to true or false, ternary operator is unecessary here
if you omit curly brackets when using arrow function you don't have to use "return" keyword