hardReact Native#131

Wordle (word guessing game)

Prompt

Implement the letter-scoring logic for a Wordle game.

Write function checkGuess(guess) that takes a 5-letter string and returns an array of { letter, color } objects:

  • Green (#4CAF50) for correct letter in correct position
  • Yellow (#FFC107) for correct letter in wrong position
  • Gray (#9E9E9E) for incorrect letter

The target word is "REACT". Max 6 attempts.

Live Preview

Hints

Solution

Your Code

20 min

Tests

Click Run to test your code