Serves to link two monomer units of either IgM or IgA. In the case of IgM, the J chain-joined dimer is a nucleating unit for the IgM pentamer, and in the case of IgA it induces dimers and/or larger polymers. It also helps to bind these immunoglobulins to secretory component.