Not a definitve answer, is how i understand it:
x evaluates that is not falsy value.
x.length evaluates that the array has at least 1 element.
the && expects that every operands is truthy starting from the left.

The time complexity check is exactly the way it should be - small number of tests with enormous input size. A correct solution (+ reference, + actual testing) will take mere 3 seconds.

Your solution is

`O(n^2)`

. The recursion is one`n`

and the`indexOf`

is another.I'm new to codewars. Is it possible to see what the tests are other than the given sample ones?

sqrt?

A prime base > 16 will fox this, surely?

Can you see it? Another user was adding comments to my translation, so it should be visible.

Why the shortest one is always the best :D

This comment is hidden because it contains spoiler information about the solution

Under Edit Kata, go to Translations, it's sitting there.

Because the string method used here may return a

`null`

which has no`length`

property.This comment is hidden because it contains spoiler information about the solution

Perfect solution!

This comment is hidden because it contains spoiler information about the solution

Not a definitve answer, is how i understand it:

x evaluates that is not falsy value.

x.length evaluates that the array has at least 1 element.

the && expects that every operands is truthy starting from the left.

The time complexity check is exactly the way it should be - small number of tests with enormous input size. A correct solution (+ reference, + actual testing) will take mere 3 seconds.

what does this expression do (x && x.length)?

hey, a familiar face!

have I help you a long time ago with your travian tools?

honestly, I can't remember a thing, except it was fun )

## Loading more items...