Well my question is relatively simple, I would like to know how I would do in Javascript that if a true condition, for example, 2 > 1
instead of appearing the image of img
appeared the image of the code in script .
My code:
if(2>1){ document.getElementById("amarelo5").src = "cores-roleta/amarelo1.png";
}
<img id="amarelo5" src="cores-roleta/amarelo0.png">