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 do the comparison because I am a beginner in JavaScript, would it be more or less like this ??
Because it always returns the condition true: (
if(console.log(ev.target.tagName) == DIV)}
alert("O log retornou DIV");
} else {
alert("O log retornou IMG");
}