JSFiddle - React, Tailwind, and code Playground

by alexflav23

JavaScript

AnagramGame = function() {

};

 /**
     * Submit a word on behalf of a user. A word is accepted if its letters are
     * contained in the original string submitted in the constructor, and if it
     * is in the word list at http://www.plumbeegames.com/codetest/wordlist.txt.
     * If the word is accepted and its score is high enough, the submission
     * should be added to the high score list. If there are multiple submissions
     * with the same score, all are accepted, but the first submission with that
     * score should rank higher.
     *
     * @parameter word User's submission. All submissions may be assumed to be
     *             lowercase and containing no whitespace or special
     *             characters.
     */
AnagramGame.prototype.submitWord = function (word) {
    for (var i = 0, ii = word.length; i < ii; i++) {
        if (word.charAt(i))
    };
};