check my first shell script

I have written the below script to determine whether a string is palindrome or not ?
But its not working, any help to debug it ?

I am new to this forum but when I searched for my question, I found that many people refused to answer this question thinking that its Homework question, Therefore I want to make it clear that its not a Homework , I am learning shell scripting on my own.

If you can still help me, thank you much.
--------------------------------------
#!/bin/sh
var="mom"
var1=`echo $var|rev`
if [$var -eq $var1];then
echo "$var is palindrom"
else
echo "$var is not palindrom"
fi

#!/bin/sh
var="mom"
var1=`echo $var|rev`
if [ $var = $var1 ]; then
   echo "$var is palindrom"
else
   echo "$var is not palindrom"
fi

P.S. pls use vB Codes when posting code snippets.

Sorry, will take care from next time.