How do you make this have a result which is an image, not text
switch(true){
case (a>b):document.getElementById("result").innerHTML="hey";
break;
How do you make this have a result which is an image, not text
switch(true){
case (a>b):document.getElementById("result").innerHTML="hey";
break;
If you're adding an image to the DOM
document.getElementById('result').innerHTML = '<img src="path/to/image" />';
If result is an image element
document.getElementById('result').setAttribute('src', 'path/to/image');