First: Like Stated before you're missing a comparison
(userAnswer === yes)
Second: This will still give you an error, why? Simple theres no word yes aka it has not been defined aka you havent assign a value to the word yes.
Solution for the second part: on top of your if/else that is quoted on my post you need to give a value to the variable to yes since its not defined.
var yes = "yes";
So the comparision if(userAnswer === yes) if the answer i received on the text box is yes and yes is equal to the answer it will run the code. If the user types something that is not "yes", it will run the else.
Hope this explanation helped you! Happy Coding!