Lasse Jørgensen

Results 175 comments of Lasse Jørgensen

It seems like it is also possible to pass this with an incorrect index that gives back undefined. ``` return options[Math.floor(Math.random() * 3) + 1] ``` Obviously, getting it to...

I'm not sure if we should specifically have a regex test for that. If anything, I think it should test for valid random generation and not invalid. It seems fairly...

That test checks that calling the function one time produces at least one of the 3 strings in the array. The other test calls it 50 times to "guaranty" the...

``` function getRandomComputerResult() { const options = ["Rock", "Paper", "Scissors"]; return options[Math.floor(Math.random() * 3)] } const results = new Set(); for (let i = 0; i < 50; i++) {...

That works, I wasn't really suggesting anything, just showing what I meant in code. But do we really need to loop that many times? I'm no statistician, but even with...

It did just dawn on me that switching the order of teaching `else` and `else if` might be an idea we should consider. So teach `if/else` first, then introduce `else...

I agree, it seems like an odd choice. Unreachable code and variable scope should be taught separately.

This is the first time campers will be taught about variable scope. They may have coded for less than half a day. Adding unreachable code as part of teaching variable...

Test 5 and test 9 are using the same regex. The assert message you get when the `find` callback isn't using an implicit return is. > Your `idToText` function should...

That doesn't hide the content. The idea is to have more information if the camper needs it, without having it take up space before they need it. Or just quickly...