Looking in the jQuery core I found the following code convention:
nth: function(elem, i, match){
return match[3] - 0 === i;
},
And I was really curious about the snippet match[3] - 0
Hunting around for '-0' on google isn't too productive, and a search for 'minus zero' brings back a reference to a Bob Dylan song.
So, can anyone tell me. Is this some sort of performance trick, or is there a reason for doing this rather than a parseInt
or parseFloat
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…