need help simplifying javascript with loop

Printable View