I found the following snippet in the jQuery source code, in the definition of the eq
function:
j = +i + ( i < 0 ? len : 0 )
I was surprised by the +i
. Rather, I would have expected:
j = i + ( i < 0 ? len : 0 )
What's the difference? What the utility of that leading +
?