Syntax error with exit code

I want to check my script with exit codes.

        sudo groupmod -n $  newname $  name          sudo usermod -l $  newname --move-home --home /home/$  newname $  name          let $  exitcode=$  ?         echo $  exitcode             if [ "$  exitcode" = 0 ]               then                    echo "Everything's ok"                 exit             elif [ "$  exitcode" != 0 ]             then                 echo "Try again"                 exit              fi 

Here is wath I get :

  let :=0 :Syntax error :operand expected (error is "=0") 

I don’t get it. I use the shell buit-in keyword let.