When i run this for loop it gives me the name bob and for jacob it says undefined does anyone have any idea why?
$(function(){
count = 1;
for(x=0; x <= count; x++)
{
track = $('#track' + x).val();
document.write(track);
}
});
<input type="hidden" id="track0" value="bob" />
<input type="hidden" id="track1" value="jacob" />