Browse Source

Mettre à jour 'quizz.js'

isundil 6 năm trước cách đây
mục cha
commit
ad96a4aa1d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;
 }