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:
An array of objects which feature the season, the team and the country of the Champions League winner.
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
Similar Kata:
Stats:
Created | Nov 3, 2016 |
Published | Nov 3, 2016 |
Warriors Trained | 4102 |
Total Skips | 40 |
Total Code Submissions | 6790 |
Total Times Completed | 3288 |
JavaScript Completions | 2351 |
PHP Completions | 175 |
Python Completions | 739 |
Elixir Completions | 83 |
Total Stars | 46 |
% of votes with a positive feedback rating | 95% of 859 |
Total "Very Satisfied" Votes | 782 |
Total "Somewhat Satisfied" Votes | 66 |
Total "Not Satisfied" Votes | 11 |
Total Rank Assessments | 8 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |