How to Evaluate two conditions in single if statement

I am trying to test two conditions in a single if and getting syntax error on -a and &&

if [[ $a -eq 1 && $b -eq 1]] ; then
  echo "variable a equals to variable b"
else
  echo "variable a not equal to variable b"
fi

in second attempt I used -a instead of &&, referring to other website, but not sure that mentioned for any other shell.

Whats the proper way to do it?

Try this and see if it works:

a=1
b=1
if [ ${a} -eq 1 -a ${b} -eq 1 ]
then
	echo "variable a equals to variable b"
else
	echo "variable a not equal to variable b"
fi

---------- Post updated at 13:18 ---------- Previous update was at 13:18 ----------

Also, what shell are you using?