I added if(newVal >= 0 && newVal < 35) with 2 conditions to check if value is in a range and then set
if(newVal >= 0 && newVal < 35)
You can't use document.getElementById("img").src = newVal+ ".jpg";, in that case you will get 100 different images
document.getElementById("img").src = newVal+ ".jpg";
0