I'm trying to make an image disappear after like 2 seconds but I don't know how to do it.
I've looked online but haven't really found anything useful.
function rockImage() {
var img = document.createElement("img");
img.src = "rock.png";
var src = document.getElementById("compChoiceImage");
img.setAttribute("width", "100");
src.appendChild(img);
}
That's the function to create the image I want to add the timer thing into the function.