• ###### farhanadityacommented on "first character that repeats" kata

@cliffstamp JS has not

• ###### romanclaycommented on "Convert a string to an array" python solution

It's always so simple in hindsight

• ###### barakplasmacommented on "Simple Encryption #1 - Alternating Split" javascript solution

yeah, cloning the n and mutating the clone locally would be better.

• ###### GetGudcommented on "Simple Encryption #1 - Alternating Split" javascript solution

while (n--)
O___O
wow so beautiful
i'll start doing that

• ###### sbrevolution5commented on "Simple Encryption #1 - Alternating Split" javascript solution

Do you mean the while(n--)? I was just going to comment that thats a cool solution. I assume you should assign it to something else first or is there a problem with changing it "during" the loop.

• ###### Sennseicommented on "How good are you really?" javascript solution

The "return" returns true if succeed or false if not. If I'm right it's 'If yourPoints are greater then "SUM divided by the length of 'classPoints' array" return TRUE otherwise return FALSE'.
I've just done it in two different ways.

``````function betterThanAverage(classPoints, yourPoints) {
//   let sumArr = 0;
//   for (let i = 0; i < classPoints.length; i++) {
//     sumArr += classPoints[i];
//   }
//   if ((sumArr / classPoints.length) < yourPoints) return true;
//   return false;

const arrSum = classPoints.reduce((a, b) => a + b, 0) / classPoints.length;
if (arrSum < yourPoints) return true;
return false;
}
``````
• ###### LesRamercommented on "Convert a string to an array" python solution

My initial attempt was:

``````string_to_array=str.split
``````

This passed all but the empty-string case.
Then I added the same implementation as we see in the above implementation (passing a space into string.split) -- which passes all the tests.

• ###### Haksellcommented on "How good are you really?" javascript solution

Adding your points to the list can't change whether you are above average of not.

• ###### Haksellcommented on "How good are you really?" javascript solution

Adding your points to the list can't change whether you are above average of not.

so smart!

• ###### Lex88commented on "Convert a string to an array" python solution

This no longer is a valid solution because we have a testcase in which string = "" and it should return [""]

• ###### Lex88commented on "Convert a string to an array" python solution

it basically means you cast a list of a list. don't do it.
the split method already returns a list.

• ###### filankcommented on "How good are you really?" javascript solution

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

• ###### PQ8Hcommented on "Convert a string to an array" python solution

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

• ###### rkoharicommented on "STRONGN Strong Number (Special Numbers Series #2) " dart solution

u also coded like me ,hahaha