make loop for the equipment js code