magnificent-vegetable-65154
01/03/2024, 10:11 PMquick-musician-29561
01/04/2024, 6:55 AMquick-musician-29561
01/04/2024, 7:34 AMquick-musician-29561
01/04/2024, 8:12 AMjs
const shuffleArray = (array) => {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
};
const rightAnswer = 4;
const wrongAnswers = [3, 5, 6];
const allAnswers = [rightAnswer, ...wrongAnswers];
const randomOrder = shuffleArray(allAnswers);
workflow.randomOrder = randomOrder;
workflow.rightAnswer = rightAnswer;
and after that two expression cards to check if the user's answer was correct or not, and based on that continue to the next Node.quick-musician-29561
01/04/2024, 8:13 AMmagnificent-vegetable-65154
01/04/2024, 1:13 PMmagnificent-vegetable-65154
01/09/2024, 10:04 PMquick-musician-29561
01/10/2024, 4:28 PM