function readVertically(arr) {
let result = '';
// 문자열의 길이중에서 가장 긴 문자열
let maxLength = Math.max(...arr.map((x) => x.length));
for(let j = 0; j < maxLength; j++){
for(let i = 0; i < arr.length; i++){
if(arr[i][j] === undefined)
continue;
else {
result += arr[i][j];
}
}
}
return result;
}
// 입력 : string => arr
// 출력 : string
// 문자열의 길이는 다양
// 비어있는 (행, 열)은 무시
// 0번째 hello 00 10 01 11 02 12
// 1번째 world
// hweolrllod