Introduction to the project
- Create a function that takes in consideration the gender, age and completed distance of an athlete and returns a rating based on the Cooper test.
How to test the Cooper test
- Run
open SpecRunner.html
in your terminal, this will show 8 green specs confirming that the program is running properly. - Use the secondary click with your mouse on the SpecRunner page and choose
Inspect
, this will open the Chrome inspect tool. - Choose
console
in the inspect tool. - Type
your_name = new Athlete({gender: 'your_gender', age: your_age, completed_distance: your_distance_run})
. Please notice that for gender you have to write'male'
or'female'
, for age and completed_distance you need to write numbers as integers and not negative numbers. - To get your Cooper test rating, type
CooperResponse(your_name)
.
Resources
- Check a range of numbers in an if condition: https://stackoverflow.com/questions/6454198/check-a-range-of-numbers-in-an-if-condition