When sodium metal is placed in a flask full of chlorine gas, a violent reaction occurs. These dangerous non-charged elements, when mixed, produce the ionic compound sodium chloride, otherwise known as table salt. Explain how this happens in terms of nuclei, electrons, and charges.