I think the answer is that there isn't really much point. We can speculate about how it came about:
- maybe an earlier version of the function used
someVar in multiple places, or in ways that genuinely benefited from having true or false, so this made more sense.
- maybe the person who wrote the function is so used to using
!! to convert to true/false that (s)he didn't even notice that it wasn't necessary here.
- maybe the person who wrote the function feels that every computation (in this case, Boolean conversion) should be given a meaningful name by assigning some variable to its result.
- maybe, since Boolean conversion in JavaScript is surprisingly error-prone (in that e.g.
new Boolean(false) is a true-valued value), the person who wrote the function feels that it should always be done explicitly rather than implicitly — even though the effect is the same — just to call attention to it as a potential point of error.
- this, of course, presupposes that the person who wrote the function thinks of
!! as an "explicit" Boolean conversion. Technically it's not — it uses the same implicit Boolean conversion that if does — but if you're used to this idiom, then it amounts to an explicit conversion.
but in my subjective opinion, none of those reasons is a very good one!