Encapsulated By Kevin Bacon

Yesterday I had the opportunity to talk to my friend John about Javascript Closures. Now my mentors and teachers have all talked to me before on this subject, but John's particular example made much sense to me.(...aside from the function declaration. I jest if your reading this John. Please don't hurt me.)

As you can see from the image above, John has created a function declaration taking in two parameters. The function in red makeName is the closure. This is scoped only to the function showFullName. This function can only be called in showFullName, as evidenced by the next line return makeName(first, last).

Hopefully this helps someone in the way it helped me.

...And you need to call the variable intro John. Missing ;

Ok. I'll shut up now.