JSFiddle - React, Tailwind, and code Playground
JavaScript
$( document ).ready(function() {
alert(anythingInCommon('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa','cddabddde'));
});
function anythingInCommon(stra, strb){
if(strb.length < stra.length){
temp = stra;
stra = strb
strb = temp;
}
for (var i = 0, len = stra.length; i < len; i++) {
if(strb.indexOf(stra[i]) != -1)
return true;
}
return false
}