Add each_pair snippet for js