You could take advantage of Template/interpolation power.
var question = quizJSON.quiz.questions.question[0],
type = question.type,
choice = question.choices.choice,
rb = '';
var template = new Template('<label for="choice#{i}"><input
type="radio" name="choices" id="choice#{i}" value="#{i}" />#{content}</
label><br />');
if (type == "multi") {
choice.each(function(item, index) {
rb += template.evaluate({ i: index, content: item })
})
}
$('choices').update(rb);
Makes code look much more readable, imho.
Best,
kangax