Skip to main content
format code
Source Link
slfan
  • 9.1k
  • 115
  • 69
  • 81

I used below function to compare two strings and It is working good.

function CompareUserId (first, second) {

function CompareUserId (first, second)
{
 
   var regex = new RegExp('^' + first+ '$', 'i');
   if (regex.test(second)) 
   {
 
        return true;
 
    }
    else 
   {
        return false;
    }
    return false;
}

I used below function to compare two strings and It is working good.

function CompareUserId (first, second) {

 var regex = new RegExp('^' + first+ '$', 'i');
 if (regex.test(second)) 
 {
 
        return true;
 
    }
    else {
        return false;
    }
    return false;
}

I used below function to compare two strings and It is working good.

function CompareUserId (first, second)
{
 
   var regex = new RegExp('^' + first+ '$', 'i');
   if (regex.test(second)) 
   {
        return true;
   }
   else 
   {
        return false;
   }
   return false;
}
Source Link

I used below function to compare two strings and It is working good.

function CompareUserId (first, second) {

 var regex = new RegExp('^' + first+ '$', 'i');
 if (regex.test(second)) 
 {

        return true;

    }
    else {
        return false;
    }
    return false;
}