I don't think this solution is accurate as function is defined in a wrong way. In this case when syntax from ES6 is used there should be 'const' keyword. I guess it works only because it's executed without strict mode.
The same for me. Done this kata in JS and passed all tests. I 've used similar logic as for JS with C#, basic tests passed but I've failed with random tests.
This comment is hidden because it contains spoiler information about the solution
I would say that's a bit messy syntax. Function should be declared at least with 'const' keyword.
I don't think this solution is accurate as function is defined in a wrong way. In this case when syntax from ES6 is used there should be 'const' keyword. I guess it works only because it's executed without strict mode.
The same for me. Done this kata in JS and passed all tests. I 've used similar logic as for JS with C#, basic tests passed but I've failed with random tests.
There's surely some issue with tests-sample tests require for empty string to return value 'false' while full tests require 'true'.