ola quero verificar se string contem no array fiz o seguinte porem nao funciona
var respostascertas= ['short',
'2',
'nose',
'eyes',
'mouth',
'dividir',
'somar',
'Mais',
'menos'];
function verifica(ite) {
alert(ite)
if(respostascertas.indexOf(ite)) {
alert("SIM")
} else {
alert("NAO")
}
}
[\code]
sempre mostra SIM independente dao valor da variavel ite, se variavle ite estiver no array SIM senao NAO mas sempre mostra SIM o que posso fazer ???