Skip to content

Commit

Permalink
You can now answer the last question and see the question numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Jul 2, 2012
1 parent 72cb0dc commit cc71708
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions color-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@
});

function presentQuestion() {
var curNum = '#' + ((total - questions.length) + 1) + ' of ' + total + '\n'
if (true !== (questions.length >= 1)) {
return false;
}
current = questions.pop();

var curNum = String(total - questions.length) + ' of ' + total + ' (#' + current.number + ')\n'
;

current = questions.pop();
doneQuestions.push(current);
if (current.question) {
console.log(curNum, current.question);
Expand All @@ -54,9 +58,7 @@
});
console.log('');

if (questions.length) {
return true;
}
return true;
}

function goBack() {
Expand Down

0 comments on commit cc71708

Please sign in to comment.