function solution(s) { let answer = ''; const arr = s.split(""); s.length % 2 != 0 ? answer = arr[Math.floor(s.length / 2)] : answer = arr[s.length / 2 - 1] + arr[s.length / 2] return answer; }
성공