Wildcards

Template: Click this link, and share with mrcodeswildride: new project

Technique

Use recursion again. The easiest way is to loop through every character in the user input, get all of the possibilities for each character, and combine each possibility with each of the previously found words.

Hints

For getting all of the possibilities for each character, refer to the character codes page.

Word Dictionary

Download this list of words and upload it to your project.
Fetch the list of words and save it in a dictionary variable:
// make an empty dictionary variable
let dictionary = {}

// fetch the list of words
let request = new XMLHttpRequest()
request.addEventListener(`load`, makeDictionary)
request.open(`GET`, `dictionary.txt`)
request.send()

// this function gets called after fetching the list of words
function makeDictionary() {
  // get all of the words in the file and save it to an array
  let words = this.response.split(`\n`)

  // loop through the array of words
  for (let word of words) {
    // save each word in the dictionary variable
    dictionary[word] = true
  }
}
Last section Next section