Created
March 3, 2016 10:41
-
-
Save bubnenkoff/509356fd26bd81af713b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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