I am very new to javascript and to test my abilities on what I have recently learnt, I have decided to create a hangman game.
One thing which I have not been taught is to show images in html from javascript.
A key part of my hangman game is that when the users lives decrease from 8 down to 0 which is game over, I want different hangman images to be shown to correspond with the lives that have reduced.
The code which I have does not show the images on the website like I expected. Why is this ?
if (lives ==7){
<img src="Hangman-0.png">
}
Thank you