Skip to content
Advertisement

increase the value of x by 1 [closed]

JavaScript

I need the value of x to increase by 1 when the condition display == old display is true

I tried to set the condition with if statement and when it is true i need x to decrease by 1. This is a part of hang man game and this part of code is to display the hang man structure when choosing wrong letter.

Advertisement

Answer

JavaScript

this snippet decreases x by 1 every time display == old_display

Advertisement