I'm trying to understand a lot of the basic components of Javascript and one of the things I came across is a line of code saying
if (varX.indexOf(String(varY),0) < 0)
varX being an array of Strings and varY being obviously one of the strings within that array. Take away the ",0" and I understand that the code is just looking for varY withing array varX. But I don't know what the ,0 does and what means for the if statement. I did what I could to look this up and didn't really come across anything.
,0denotes the start of the search. It default starts at 0, so this is redundant.