Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Functions, Packing, and Unpacking!
You have completed Functions, Packing, and Unpacking!
Preview
How about sending data to a function?
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
We've been using some pretty
simple examples so far.
0:00
Our function that adds two plus two
together wasn't very interesting,
0:00
even after we returned a value from it.
0:04
You might be thinking I still don't
get why functions are so useful.
0:06
Well, let's expand on this.
0:10
Our 2 plus 2 function
would be a lot more useful
0:12
if we could use it to add the number 2 to
any integer and we can totally do that.
0:15
Just like functions can send values
back via a return, functions can receive
0:20
values too and they can see, access and
use those values inside the function.
0:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up