From 9a73a12561bb5471b0941dbe133832941cd53dec Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 6 Jun 2017 16:07:45 +0200 Subject: Pass for array functionality --- synhestesis.js | 11 +++++++++-- 1 file 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 -- cgit v1.2.3