3
Good morning, I’m trying to make an if whose condition is the result of a console.log
But I have no idea how to make the comparison because I’m a beginner in Javascript, would be more or less like this??
For it always returns the true condition :(
if(console.log(ev.target.tagName) == DIV)}
alert("O log retornou DIV");
} else {
alert("O log retornou IMG");
}
Why not directly check the if value(Ev.target.tagname == "DIV") ?
– Caique Romero
It worked @Caique, thanks and sorry for the ignorance
– Sora
There is no reason to excuse the site and to ask questions. Every day we learn something new. I answered your question below to supplement my comment.
– Caique Romero
Perfect!! Vlwww
– Sora