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 JavaScript Basics (Retired) Creating Reusable Code with Functions Create a max() Function

Stuck again because the lesson doesn't give you the specifics you need for the challenge...

There are no numbers stuck in strings that I need to parse out so I am not sure why I keep getting the Parse error. I know this is close, but it still isn't right.

script.js
function max( lower , upper ) {
var lower = Math.random( < 10 );
var upper = Math.random( > 10 );
  return upper;
}

1 Answer

I figured it out. I keep overthinking the problems and have to dumb it down to get the answers right. I keep adding extra variables I don't need. I solved this by writing the call then the var and that was all I needed. Thank you for dealing with all my frustration. One day I hope to be as helpful as many of you are!

It's okay to over think the problems, Jeremiah. We all do it at one point or another. You may be helpful right now and not even know it. And I guarantee that, with time and experience, you will be very helpful indeed! :)