Horje
JavaScript find common characters between the strings Code Example
JavaScript find common characters between the strings
let x = "farceus";
let y = "character";

const commonCharacters = function (string1, string2) {
  let duplicateCharacter = "";
  for (let i = 0; i < string1.length; i += 1) {
    if (duplicateCharacter.indexOf(string1[i]) === -1) {
      if (string2.indexOf(string1[i]) !== -1) {
        duplicateCharacter += string1[i];
      }
    }
  }
  return [...duplicateCharacter];
};

console.log(commonCharacters(x, y));




Css

Related
laravel 7 css loading slow Code Example laravel 7 css loading slow Code Example
vue sass loader Code Example vue sass loader Code Example
hide the scrollbar in css if not overflow Code Example hide the scrollbar in css if not overflow Code Example
how to make div position top in css Code Example how to make div position top in css Code Example
place-content css property Code Example place-content css property Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7