Skip to content

SchoolOfCode/week-6-hackathon-SarJHunt

 
 

Repository files navigation

🥷🏻 Kata description:

  • Create a function that calculates a country's total tournament wins across the World Cup and Euros since 1970, using the two lists below.

  • If the country is included, it should return the total number of wins. You should account for the input of a country that is not listed, and also the input of a country regardless of whether it is uppercase or lowercase.

  • For example, if the country is France, the number of total wins will be 4 - they have won 2 World Cups and 2 Euros.

  • Head to the main.js file to implement your code.

  • The solution is in the answer.js file if you get stuck!

function countryTotalWins(worldCups, euros, country) {
    //Your code here...
}
Euros
year: 1972, winner: 'West Germany'
year: 1976, winner: 'Czechoslovakia'
year: 1980, winner: 'West Germany'
year: 1984, winner: 'France'
year: 1988, winner: 'Netherlands'
year: 1992, winner: 'Denmark'
year: 1996, winner: 'Germany'
year: 2000, winner: 'France'
year: 2004, winner: 'Greece'
year: 2008, winner: 'Spain'
year: 2012, winner: 'Spain'
year: 2016, winner: 'Portugal'
year: 2020, winner: 'Italy'
year: 2024, winner: 'Spain'

World Cup
year: 1970, winner: 'Brazil'
year: 1974, winner: 'West Germany'
year: 1978, winner: 'Argentina'
year: 1982, winner: 'Italy'
year: 1986, winner: 'Argentina'
year: 1990, winner: 'West Germany'
year: 1994, winner: 'Brazil'
year: 1998, winner: 'France'
year: 2002, winner: 'Brazil'
year: 2006, winner: 'Italy'
year: 2010, winner: 'Spain'
year: 2014, winner: 'Germany'
year: 2018, winner: 'France'
year: 2022, winner: 'Argentina' 

About

bootcamp-18-week-6-hackathon-workshop_make-your-own-codewars created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 53.3%
  • JavaScript 34.0%
  • CSS 12.7%