This is matching algorithm of WORDLE game. You can implement the algorithm to build your desired application.
import {Wordle} from './wordle'
Wordle(guess, solution)
include('wordle.php')
Wordle($guess, $solution)
from 'wordle' import Wordle
Wordle(guess, solution)
// Import namespace or Include to your class
Wordle.Wordle(guess, solution)
// Import or Include to your class
wordle.Wordle(guess,solution)
// Import or Include to your class
Wordle("agshs","sdsds")
Returns an Array
/String[]
of the status of each letter of the guessed word comparing to the solution word.
"correct"
: The letter is in correct position"present"
: The letter is in present in the word, but not in position"absent"
: The letter is in absent in the word
Example return:
["absent", "present", "correct", "present", "absent"]