JSFiddle - React, Tailwind, and code Playground

by João Vitor Scheuermann

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)