소스 검색

Mettre à jour 'quizz.js'

isundil 6 년 전
부모
커밋
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;
 }