Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function print_questions(questions) {
- for (var i = 0; i < questions.length; i++) {
- question = questions[i];
- console.log(question.text);
- sub_questions = question.sub_questions;
- if (sub_questions.length > 0) {
- print_questions(sub_questions)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement