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!
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

Jennifer Keisling
155 PointsFunctions and Scoping
Sorry if this seems like a dumb question, but I don't really understand functions and have no idea as to scoping at all. I watched the videos, but they didn't explain anything, they just showed me how to do a specific thing, which didn't help.
1 Answer

Tommy Gebru
30,164 PointsThere are no dumb questions, sometimes it helps to upload code to the forum, that way others can overlook and describe the relationship of the code or language. In your case the code is below:
float addTwo( float x, float y) {
return x + y;
}
The formula or explanation is below:
returnType functionName(dataType argumentOne, dataType argumentTwo) {
return something;
}
It really helps to take notes when watching the videos, it will help with the structure and reasoning behind the code. Also a great way to use the forum when waiting for a reply, is to review past forum discussions related to your topic ! In your case simply right click under your post on the functions button and open in new tab, this new tab is a list of recent posts related to your question or topic.