Simple JavaScript Solution
js\n/**\n * Initialize your data structure here.\n */\nvar MagicDictionary = function() {\n    this.table = {}\n};\n\n/**\n * Build a dictionary through a list 
```js\n/**\n * Initialize your data structure here.\n */\nvar MagicDictionary = function() {\n    this.table = {}\n};\n\n/**\n * Build a dictionary through a list of words \n * @param {string[]} dict\n * @return {void}\n */\nMagicDictionary.prototype.buildDict = function(dict) {\n    for (let word of dict) {\n        this.table[word.length] = (this.table[word.length] || []).concat(word)\n    }\n};\n\n/**\n * Returns if there is any word in the trie that equals to the given word after modifying exactly one character \n * @param {string} word\n * @return {boolean}\n */\nMagicDictionary.prototype.search = function(word) {\n    return !!this.table[word.length] && this.table[word.length].some((w) => {\n        let isModified = false\n\n        for (let i = 0; i < word.length; ++i) {\n            if (word[i] !== w[i]) {\n                if (isModified) {\n                    return false\n                } else {\n                    isModified = true\n                }\n            }\n        }\n        return isModified\n    })\n};\n```
[]