Get last day of month

by ChangJoo Park

JavaScript

function daysInMonth(year, month) {
  return new Date(year, month, 0).getDate();
}


console.log(daysInMonth(2018, 6))