Help! JavaScript giving me an extra image when not needed.
Go to solution
Solved by Mr_KoKa,
change
else { unknown+=1; }
to
else if(user !== "done") { unknown+=1; }
because withou t checking for done it will be still incrementing unknown when user is done.
and
if(user=="done") { //n-=1; displayThemSpooks(witch,bat,ghost,unknown); }
just to
displayThemSpooks(witch,bat,ghost,unknown);
because out of that loop user is always equal done so tehre is no need to change check.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now