Homework

Wordle Helper

Wordle is a word guessing game.

Create an HTML page that displays all the possible wordle answers given the position of green letters.

You can use .match() with periods (.) as placeholders for letters the user doesn't have a green tile for yet.

Play around with .match() and discover for yourself how to use it for this homework.

Don't be afraid to experiment and make mistakes. Part of being a software engineer is learning new things by trial and error.

Try different variations of this:

i.e.

console.log('poopy'.match('p..py'))
console.log('kitten'.match('kit...'))
console.log('doggo'.match('dog'))

if ('puppy'.match('p..py')) {
  console.log('is a pupper??')
}

Example

The user is prompted

Where are your green letters?

They answer

The page should show:

Word list

The following is a list of valid Wordle words you can use for your page. Copy and paste this list into your JS file.

Last updated

Was this helpful?