Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Treehouse Club - MASH MASH - JavaScript The Structure of Functions - Part 3 of 3

Call the function by giving an age in the space for a parameter????

I've tried everything, and it keeps giving me the response "error"

2 Answers

rdaniels
rdaniels
27,258 Points

Just put any number in the parenthesis at the bottom where it says random_age()... That should do it!

At the top you define function with the parameter named "age". Then at the bottom you execute that function "random_age();". Now, if you leave parenthesis empty, function will not know what age you wish to use for this function. Use some number, for example random_age(16); so that function can execute knowing that age is 16.