Clean up code
This commit is contained in:
parent
10078cde5f
commit
1e5c66fb64
|
|
@ -64,10 +64,8 @@
|
|||
// this means the answer comes from a matrix, where the keys are the labels and the values are the respective answers
|
||||
let answerObject = answer.answer;
|
||||
let keysAndValues = [];
|
||||
for (let i in answerObject) {
|
||||
if (answerObject.hasOwnProperty(i)) {
|
||||
keysAndValues.push(`${i}: ${answerObject[i]}`);
|
||||
}
|
||||
for (let prop of Object.keys(answerObject)) {
|
||||
keysAndValues.push(`${prop}: ${answerObject[prop]}`);
|
||||
}
|
||||
answerText = keysAndValues.join(', ');
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue