I have two question
1) how can I check two shuffle string have same characters Like I have
var str1 = \"ansar@#//1\";
var str2 = \"@#//sanra1\";
this will return empty string if character set in both strings is the same.
function findDiff (str1, str2)
{
var diff = '';
if (str1.length > str2.length)
{
var search = str1;
var compare = str2;
}
else
{
var search = str2;
var compare = str1;
}
for (var i = 0; i < search.length; i++)
{
var symbol = search[i];
if (compare.indexOf(symbol) === -1)
{
diff += symbol;
}
}
return(diff);
}
findDiff("ansar@#//123", "@#//sanra");
https://jsfiddle.net/tadaspaplauskas/pn7jnj8e/