YOU ROCK!!!!!!!!!!!!!!!!!!!!!!
that error, which I should have seen right away was the fix. i was able to pass the correct value for a loop over 2 items and for 4 items. This is awesome and does exactly what I needed.
Thanks for the help and your patience. I am still learning JS and have not actually done anything with JS for over a month so some simple things that I normally would see I missed.

Thanks again.