I'm referring to this question: Pick random property from a Javascript object
In the marked answer, the author is using the following code:
if (Math.random() < 1/++count)
result = prop;
My questions:
- What exactly is the function of the slash?
- Is there a name for this syntax?
Thank you!