I am trying to match two values in two arrays
var months ['jan', 'feb', 'march'];
var noDays ['31', '28', '31'];
Then i want to fin the months with the maximum number and return them as such
“both jan and march have a total of 31 days”
any suggestions please
Well, that problem could be solved with a simple algorithm:
After executing this code, maxDays is
31and longestMonths is['jan', 'march']