5910 Breckenridge Pkwy Suite B, Tampa, FL. 33610
(800) 272-0707

SkillSoft Explore Course

IT Skills     Web Development and Graphic Design     Scripting     JavaScript

This 14-video course covers closures—the bundle of a function along with its enclosing environment—and its implications on factors such as variable scopes and function references. Key concepts covered here include what makes up a closure in Javascript; learning how variables of the same name inside closures and in scopes outside them are accessed by functions; and distinguishing between variables of the same name inside functions, within closures, and ones defined in a global scope. Begin by observing how to implement counter functions with closures; how to integrate closures with buttons on web pages; and how closures can be created within objects and implications on your code. Next, learn how closures created within loops interact with variables defined within and outside the loop; how to implement getter and setter functions for Javascript objects using closures; and learn when to use prototypes for objects and how to define them. Finally, observe how to distinguish between object prototypes and classes; learn to use prototypes to implement inheritance; and implement multiple levels of inheritance with prototypes.



Objectives

JavaScript: Closures & Prototypes

  • discover the key concepts covered in this course
  • recognize what makes up a closure in JavaScript
  • recall how variables of the same name inside closures and in scopes outside them are accessed by functions
  • distinguish between variables of the same name inside functions, within the closure, and ones defined in a global scope
  • implement counter functions with closures
  • integrate closures with buttons on a web page
  • recognize how closures can be created within objects and its implications on your code
  • recognize how closures created within loops interact with variables defined within and outside the loop
  • implement getter and setter functions for JavaScript objects using closures
  • identify when to use prototypes for JavaScript objects and how they can be defined
  • distinguish between object prototypes and classes in JavaScript
  • use prototypes to implement inheritance in JavaScript
  • implement multiple levels of inheritance using prototypes
  • summarize the key concepts covered in this course