JSFiddle - React, Tailwind, and code Playground
JavaScript
let teste = "teste.js";
function matchCharacter(toMatch, string) {
for (let char of string) {
if(char === toMatch) return true
}
return false
}
let matched = matchCharacter(".", teste);
console.log(matched)