Person, I have this code:
const arrayOne = ['jean','geleia','gean','ea games', 'e1'];
function buscar(){
arrayOne.forEach(function(valor){
const teste1 = document.getElementById('valorInput').value;
if(teste1 === valor){
alert (true)
} else {
alert(false)
}
})
}
<html>
<body>
<input id='valorInput'/>
<button onClick='buscar()'> Buscar </button>
<h1 id='resultado'> Resultado </h1>
</body>
</html>
I wanted to know how I do that, when I type the letter 'a' it would return true
in the words that exist the letter 'a'?
Could someone help me?