프로그래머스 문제
function solution(s) { const index = Math.ceil(s.length / 2) - 1; const length = s.length % 2 === 1 ? 1 : 2; return s.substr(index, length) }