문제

 

풀이 코드

function solution(num) {
  return num % 2 == 0 ? 'Even' : 'Odd';
}

 

풀이 과정

삼항 연산자를 이용하여 한줄의 코드로 표현할 수 있다

+ Recent posts