function getRow(rowIndex){
if(rowIndex == 0) return [];
let list = [1];
let res = [];
res[0] = [1];
for(let i = 0; i < rowIndex-1; i++){
list.unshift(0);
for(let j = 0; j < i+1; j++){
list[j] = list[j] + list[j+1]
}
res[i+1] = [];
for(item of list){
res[i+1].push(item);
}
}
return res;
}