Skip to content

Instantly share code, notes, and snippets.

@bubnenkoff
Created March 3, 2016 10:41
Show Gist options
  • Save bubnenkoff/509356fd26bd81af713b to your computer and use it in GitHub Desktop.
Save bubnenkoff/509356fd26bd81af713b to your computer and use it in GitHub Desktop.
foo : function()
{
var iLevel = 0;
for (var question of this.questions)
{
for(var answer of question.answers)
{
processOneQuestion(answer)
}
console.log(firstLevelAnswerIsSelectedCount);
iLevel++;
}
// console.log(iLevel);
// console.log("firstLevelAnswerIsSelectedCount: ", firstLevelAnswerIsSelectedCount);
},
isSelectedCount = 0 ;
function processOneQuestion(answer)
{
if (answer.isSelected)
{
firstLevelAnswerIsSelectedCount++;
if (firstLevelAnswerIsSelectedCount == MaxAllowedChoice)
{
//disable buttons
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment