* Nonmetals: Nonmetals generally have a strong tendency to gain electrons to achieve a stable electron configuration. They are not likely to lose electrons easily.
* Similar Electronegativity: Electronegativity is the measure of an atom's ability to attract electrons in a bond. Chlorine and bromine have similar electronegativity values, meaning they have a similar attraction for electrons.
When two nonmetals with similar electronegativity values bond, neither atom is strong enough to completely remove an electron from the other. Instead, they share electrons to achieve a stable electron configuration. This sharing of electrons is the basis of a covalent bond.
In the case of chlorine and bromine, they form a diatomic molecule, ClBr, where each atom shares one electron with the other to achieve a full outer shell of electrons.
Let me know if you would like to explore more about covalent bonding!