最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Wordle clone game in Code.org not validating user guess - Stack Overflow

programmeradmin0浏览0评论

So, for some reason the user input is the randomWord, but it keeps saying it is incorrect, and I don't know how to fix it. Please help, thx!

Here is the link: [][1]

The error is happening in the checkIfCorrect function with the for loop.

So, for some reason the user input is the randomWord, but it keeps saying it is incorrect, and I don't know how to fix it. Please help, thx!

Here is the link: [https://studio.code./projects/applab/mbsiP3rgVMmRJJGlvw0VRtIKqa2jiwtTPB8SRYcS9vU][1]

The error is happening in the checkIfCorrect function with the for loop.

Share Improve this question edited Mar 3 at 18:18 Alex Stringer asked Mar 3 at 18:16 Alex StringerAlex Stringer 11 bronze badge 1
  • You should post the relevant code in the question. See How to Ask – Tangentially Perpendicular Commented Mar 3 at 18:27
Add a comment  | 

1 Answer 1

Reset to default 0

The userGuess variable is not getting set to the user inputs as the program runs. Add in a line before you call checkIfCorrect to update the variable before you pass it to the function..

userGuess = getTest("userInput");

发布评论

评论列表(0)

  1. 暂无评论