JavaScript 조건문 복습 중 간단한 윤년 판별기를 만들어보았다.
function answer(year) { let result; if (year % 4 == 0 && year % 100 != 0) { result = true; } else if (year % 4 == 0) { result = true; } else { result = false; } return result; }