Javascript Loop Through Array With Division 2