This function will help you to get the answer option selected by the respondents and use it within your script.
$survey.getSelectedOption("Question Code")
We can capture the options that are selected in the source questions(Q1) and by default select the same answer options under the follow up question.
var arr = $survey.getSelectedOption("Q1");
var items = ["Soccer","Cricket","Basketball","Hockey","Baseball","Tennis","Football","Badminton"];
//console.log(items);
for (var i = 0; i < items.length; i++) {
if(items[i] == arr) {
//console.log(items[i]);
$survey.setOptionSelected("Q2", i+1);
}
}