diff options
author | ache <ache@ache.one> | 2017-06-06 16:07:45 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2017-06-06 16:07:45 +0200 |
commit | 9a73a12561bb5471b0941dbe133832941cd53dec (patch) | |
tree | 16d14b36c88ebcf6ea46cab2cc4fbf2b72fa4e9f | |
parent | Fin des kanjis (diff) |
Pass for array functionality
-rw-r--r-- | synhestesis.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/synhestesis.js b/synhestesis.js index 8fb30f6..3696c5a 100644 --- a/synhestesis.js +++ b/synhestesis.js @@ -57,8 +57,15 @@ function loadFile( str ) { function pass() { console.log(inputAnswer.value) asPass = true - inputAnswer.value = "" + res.answer[indexRes].value - console.log(inputAnswer.value) + var valid = "sry"; + + if( res.answer[indexRes].value != undefined ) { + valid = res.answer[indexRes].value; + } else if( res.answer[indexRes].values != undefined ) { + valid = res.answer[indexRes].values[0]; + } + + inputAnswer.value = "" + valid } function reset() { cmpGood = 0 |