As an atom, chlorine is very unstable because it only has 7 electrons in its outersmost shell. In order to become stable, it needs to complete its octet, i.e. have 8 electrons in its outermost shell.
When chlorine bonds to metals, it will take an electron from them to become the chloride anion,
For example, in sodium chloride, the chlorine atom will take one electron from sodium's outermost shell, forming an ionic bond and giving rise to the aforementioned chloride anion and to the sodium cation,
So, as a conclusion, in