"hello" уже не видно. Так и до return не доходит. Ошибок в консолеи нет.
function genArr(countQuestions){
let Questions = [];
let max = events.length;
if (arrRadioBut[1].checked === true){
for(let i = 0;i<countQuestions;i++){
let index = getRandomNum(0,max);
Questions.push(events[index]);
}
}
else if (arrRadioBut[0].checked === true){
for(let i = 0;i<countQuestions;i++){
let index = getRandomNum(0,max);
let breakVar;
while (breakVar!= false){
let index = getRandomNum(0,max);
breakVar = false;
for( el of Questions){
if ((el[0] === events[index][0])
&& (el[1] === events[index][1])){
breakVar = true;
break;
}
}
if (breakVar === false){
Questions.push(events[index]);
events.splice(index,1);
max -= 1;
}
}
console.log("hi");
}
console.log("hello");
}
console.log(Questions);
return Questions;
}