When chlorine reacts with dilute and cold $NaOH$, sodium chloride and sodium hypochloride are formed.
$2 NaOH$ (cold) $+ Cl _{2} \rightarrow NaCl + \underset{\text{soldium hypochloride}}{NaClO} + H _{2} O$
Let oxidation state of $Cl$ in $NaCl$ is $x$.
$NaCl +1 + x =0 x=-1$
Let oxidation state of $Cl$ in
$NaClO$ is $x . NaClO$
$ +1 + x -2 =0$
$x -1=0$
$x = + 1$
$\therefore$ Oxidation states of chlorine changes from
$0$ to $-1$ and $+1 .$