Create a function that takes the current day (e.g. "2019-09-30"), an array of date objects and returns the "current streak" (i.e. number of consecutive days in a row).
currentStreak("2019-09-23", [
{
"date": "2019-09-18"
},
{
"date": "2019-09-19"
},
{
"date": "2019-09-21"
},
{
"date": "2019-09-22"
},
{
"date": "2019-09-23"
}
]) ➞ 3
currentStreak("2019-09-25", [
{
"date": "2019-09-16"
},
{
"date": "2019-09-17"
},
{
"date": "2019-09-21"
},
{
"date": "2019-09-22"
},
{
"date": "2019-09-23"
}
]) ➞ 0
today parameter will always be greater than or equal to the last date in the array.0.