chlorine has 7 electrons in its outermost orbit .it accepts one electron and gets the stable configuration of argon gas..
sodium has 1 electron in its outermost shell ,it looses that electron and acquires the stable configuration of neon gas(inert gas )