If sodium chloride is taken, it will produce sodium and chlorine gas. Sodium forms at the cathode, while chlorine gas forms at the anode. At the anode, Cl- ions are attracted to the positive anode, forming Cl2 + 2 electrons. At the cathode, Na+ ions are attracted to the negative cathode, where Na+ picks up an electron to form sodium metal. If the substance is molten, the process is different compared to when it is in aqueous solution due to the presence of extra ions like OH- and H+ from water.