Answers for "check if string is substring of another string"

0

check if string is substring of another string

function mutation(arr) {
  let first = arr[0];
  let second = arr[1];
  
  return first.indexOf(second) !== -1;
}

console.log(mutation(["hello", "hel"]));
Posted by: Guest on September-04-2021

Code answers related to "check if string is substring of another string"

Browse Popular Code Answers by Language