Explorar o código

Mettre à jour 'quizz.js'

isundil %!s(int64=6) %!d(string=hai) anos
pai
achega
ad96a4aa1d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      quizz.js

+ 1 - 1
quizz.js

@@ -46,7 +46,7 @@ String.prototype.isWord = function() {
 Question.prototype.getQuestionType = function() {
     if (this.isBoolean())
         return QuestionType.bool;
-    if ((/^[0-9]+$/).exec(this.response))
+    if ((/^-?[0-9]+$/).exec(this.response))
         return QuestionType.number;
     return QuestionType.string;
 }