며칠

Grace·2021년 11월 3일
0

알고리즘 풀이

목록 보기
8/55
function days(month) {
  if (month === 2) {
    console.log('28')
  } else if (month <= 7) {
    if (month % 2 === 0) {
      console.log('30')
    } else {
      console.log('31')
    }
  } else {
    if (month % 2 === 0) {
      console.log('31')
    } else {
      console.log('30')
    }
  }
}
profile
기술블로그 이전:: https://meercat.tistory.com/

0개의 댓글