Created
October 23, 2010 02:35
-
-
Save k0001/641694 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check wether the given ``answer`` produces the right output for | |
* the current level. | |
* | |
* Returns ``null`` on success. Otherwise returns the wrong output. | |
*/ | |
Soret.check_answer = function(regex, repl) { | |
var user_output = Soret.sub(regex, repl); | |
if (user_output != Soret.get_expected_output()) | |
return user_output; | |
return null; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment