All code:

<meta charset='utf-8'> <script> alert('Начнём, игру') var goodgame = 0 var quest =prompt('Идёт, мычит, качается...'); if (quest == бык || quest == бычок) { alert('Это правильный ответ!'); goodgame++ } else { alert('Это неправильный ответ'); } quest = prompt('Если б не было его, не сказал бы ничего.'); if (quest == язык); { alert('О боже, как ты угадал ?!'); goodgame++ } else { alert('Ты не угадал') } quest = prompt('Кругом вода, а с питьем беда.'); if (quest == море); { alert('Я в тебе не сомневался'); goodgame++ } else { alert('Ты не прав.'); } alert('Твои правильные ответы' + goodgame) alert('Всего доброго, игра закончена кстати, можешь идти.') </script> 

The problem itself:

 quest = prompt('Если б не было, не сказал бы ничего.'); if (quest == язык); { alert('О боже, как ты угадал ?!'); goodgame++ } else { alert('Ты не угадал') } 

After the curly bracket that goes right after the "else" gives an error, I can not understand what the problem is, please help.

I will be grateful.

Closed due to the fact that off-topic participants Alexey Shimansky , Nick Volynkin Nov 26 '16 at 5:58 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - Alexey Shimansky, Nick Volynkin
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    Don't forget to put the lines in quotes, like this: "язык" . Otherwise, the browser will swear that the variable "language" is not declared. - Surfin Bird

1 answer 1

You have a typo.

 if (quest == язык); { ^^^ 

Remove the semicolon.

The same applies to this proposal.

 if (quest == море); { ^^^ 

And string literals should be enclosed in quotes.

  • And after goodgame++ semicolon. - Nick Volynkin
  • @NickVolynkin, in this case, he will put down - Grundy