JSFiddle - React, Tailwind, and code Playground

by vasi_32

JavaScript

function checkString(myString,withCompare){

 var dumArray = withCompare.split('')
 var i = 0;
 for(i;i<dumArray.length;i++){
   if(myString.indexOf(dumArray[i]) ==-1){
      // do nothing
      console.log('nothing')
   }
    else{
      console.log(dumArray[i])
    }
 }


}

checkString('hello','mvo');