code.ashish.me

Atom feed

Recently added: 128 Longest Consecutive Sequence, 347 Top K Frequent Elements, 045 Jump Game 2, 228 Summary Ranges, 219 Contains Duplicate 2

06 Leap Year

function leapYear(year){
  return (year % 4 === 0) && (year % 100 !== 0)
}

console.log(leapYear(2013))

Created 2019-11-30T02:13:21+05:30 · Edit