First ionic bonds in this salt are separeted
because of heat:
NaI(l) → Na⁺(l) + I⁻(l).
Reaction of reduction at cathode(-): Na⁺(l) + e⁻ → Na(l) /×2.
2Na⁺(l) + 2e⁻ → 2Na(l).
Reaction of oxidation at anode(+): 2I⁻(l) → I₂(l) + 2e⁻.
The anode is positive and the cathode is negative.