Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
220,925 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
220,925 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
220,925 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
220,925 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
220,925 Points

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

thank you!