def display_word(word, guesses): for letter in word: if letter in guesses: display += letter display += "_" return display
You can use the following code to get the language of the code in the editor: var lang = CodeMirror.getMode(editor, editor.getOption("mode")).name; A: You can use the following code to get the language of the code in the editor: var lang = CodeMirror.getMode(editor, editor.getOption("