During electrolysis, Na+ ions are not discharged. Instead H+ which is discharged more readily is released as hydrogen gas at the cathode. As H+ is discharged, more water dissociates to replace it. The chloride ions are discharge at the anode giving chlorine gas. Sodium (Na+) ion and hydroxide (OH-) ions accumulate in the solution, which on evaporation yields sodium hydroxide.