For the Udacity Frontend Web Developer NanoDegree, the “Professional Presence Update 1” after finishing < a href=”http://mmerlin.github.io/resume/”>Project 2</a> suggests reflecting on the code review. Not a lot there to reflect on. Everything is just marked Meets Specifications. But …
http://discussions.udacity.com/t/what-is-considered-encapsulation-for-project-2/2729 For Encapsulation, the details say Some functions are encapsulated in related objects but most functions are on the global scope. Really? The ONLY function in the global scope, in resumebuilder.js was inName(). AND that had a comment header that said it had to stay in the global scope to be able to work with the functions provided in helper.js. Everything else was wrapped in an anonymous function to explicitly keep things out of the global scope. True, the functions, other than the ones used to fill in the sections of the page are not created as properties on an explicit associated object. Instead, they were created in ‘function closure scope’. But that is not global scope! At this point in the course, we had not been shown function prototypes yet. That would have been an alternate place to tie the code to. Perhaps that would have been considered proper encapsulation.