Check out a free preview of the full JavaScript: From Fundamentals to Functional JS, v2 course:
The "Function Scavenger Exercise" Lesson is part of the full, JavaScript: From Fundamentals to Functional JS, v2 course featured in this preview video. Here's what you'd learn in this lesson:

In this exercise, students determine each part of a function.

Get Unlimited Access Now

Transcript from the "Function Scavenger Exercise" Lesson

[00:00:00]
>> Bianca: So, I'm gonna send you guys on a scavenger hunt. You wanna find definitions, function names, where things are being invocated, arguments, parameters, function bodies, and where there are return values and where there are side effects. I didn't mention the last part, so return values are anything that's explicitly returned, in this case an ES5 at least.

[00:00:19] It's explicitly returned with a return statement, right? You see the word return then it's something that's being returned. And then side effects are things that are happening other than returning the value that effects something outside of that function. So, console.log for example is a side effect, because you are logging to the console that exists outside of that function.

[00:00:45] That's a side effect. Or if you're changing the value of an object that's in a different scope. That's a side effect.
>> Bianca: Cool? Are we clear on kind of the trickier points of side effects versus return, invocation versus definition, and parameters versus arguments?