stuck on comparing strings
Hi there. I have a spin off of Project: Hoppy Beaver Extreme (Advanced JS Games and Visualisations) where the beaver collects letters to make words instead of sticks. I'm trying to create the win condition. I can correctly track the letters grabbed and the order grabbed but am stuck comparing whether they match the word that is the win condition. I suspect my logical operator does not work for strings but not sure of one that does. Can you help? Or if this isn't the right place, let me know where to ask, please.
//win condition
if( beaver.word.join("") === (level1.word)){
text("WINNER!!", 100,100);
}
Please sign in to leave a comment.