Function to check if any of three values equals one of the other two
04:39 10 Oct 2014

I have three dynamic variable s.

My below code is working to check if all are equal:

if ((a == b) && (b == c)) {
   // they're all equal ...
}

I want to create a function passing three variables to check if any one variable is equal to another variable.

a=1;b=2;c=1;
isEqual = compareVariable(a,b,c);

Here isEqual should be true .

How to create this function

javascript function equality