7 kyu

Find how many times did a team from a given country win the Champions League?

739 of 3,288PiotrBerebecki

Description:

Create a function that takes two arguments:

  1. An array of objects which feature the season, the team and the country of the Champions League winner.

  2. Country (as a string, for example, 'Portugal')

You function should then return the number which represents the number of times a team from a given country has won. Return 0 if there have been no wins.

For example if the input array is as follows:

countWins(winnerList1, 'Spain') => should return 2
countWins(winnerList1, 'Portugal') => should return 1
countWins(winnerList1, 'Sportland') => should return 0

Strings
Arrays
Data Structures
Algorithms

Stats:

CreatedNov 3, 2016
PublishedNov 3, 2016
Warriors Trained4102
Total Skips40
Total Code Submissions6790
Total Times Completed3288
JavaScript Completions2351
PHP Completions175
Python Completions739
Elixir Completions83
Total Stars46
% of votes with a positive feedback rating95% of 859
Total "Very Satisfied" Votes782
Total "Somewhat Satisfied" Votes66
Total "Not Satisfied" Votes11
Total Rank Assessments8
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • PiotrBerebecki Avatar
  • JohanWiltink Avatar
  • davejones Avatar
  • ekamaks Avatar
  • saudiGuy Avatar
Ad