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 Review Creating Reusable Code with Functions

I don't understand this

Javascript

Steven Parker
Steven Parker
231,269 Points

The link button leads to a quiz with 5 questions. Is there a particular one you're having trouble with?

Yes the one on how to return the function for both questions.

4 Answers

Steven Parker
Steven Parker
231,269 Points

Returning a value from a function involves placing the value (a variable name or an expression) after the keyword "return".

You may want to review the Getting Information from a Function video.

I rewatched it but i still don't understand what it want's, i am doing the return value and it still does not work.

Steven Parker
Steven Parker
231,269 Points

When you say "doing the return value", what exactly are you putting in the blank?

And did you say two questions? I only see one about returning. Perhaps you should quote the whole question(s) also.

i typed return message for one of the answers and return warning for the other.

Steven Parker
Steven Parker
231,269 Points

Your first answer looks like the correct response to the question I was talking about.

But I think you have misunderstood the other question. The only other question with a fill-in blank is not about returning anything, but it asks you to write the code to call a function.

Yes I am trying to do that second part but i am having trouble with calling the function.

Steven Parker
Steven Parker
231,269 Points

to call a function, you write the function name followed by parentheses: "somefunction()"

thank you!