Эх сурвалжийг харах

Mettre à jour 'quizz.js'

isundil 6 жил өмнө
parent
commit
ad96a4aa1d
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  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;
 }