31.countPageViews

Write a function named countPageViews that receives 3 parameters:

  • pageViews - an Array of objects describing views of our page. Each object contains the number of views from a particular country, at a particular time and has the following properties:

    • date - a Date
    • country - a string representing a country code
    • count - a number
  • country - a string representing a country code

  • interval - an object with 2 properties, startDate and endDate - each of them Dates

The function should return the number of page views from that country between those 2 dates (inclusive).

Example 1

Input

pageViews

=

country

=

interval

=

Output