Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
The comma in that context is technically an operator, rather than a separator. ecma-international.org/ecma-262/5.1/#sec-11.14 And it is terrible. Unless you want your code to be hard to read. As you do here. So, kudos.
@Rynant Yeah, 1, 3, 6, and 9 really throw my definition off (foolish positive bias!). I'll pay more attention from here on out. Fortunately, everything but 4 is explicitly spelled out in the challenge. So the rule is consistent, but with an extra layer of complexity.
The trick is actually that Math.random cares nothing for our meager parameters. It chooses numbers its own way. the |0 is correctly rounding the unexpected result, and so is not a source of any trickery.