Closures and Scoping Flashcards
What concept in JavaScript is the idea that programs keep track of variable locations to understand where to access them?
lexical scoping
Does JavaScript support private methods natively in the same way that languages like Java do?
No. Even though JavaScript does not support private methods natively in the way languages like Java do, we can still emulate this behavior using closures.
Closures in JS and ES6 refer to functions that remember their _____ ________and can further reference that environment’s independent variables.
creation environment
_____ ______ refers to the JavaScript concept of programs keeping track of variable locations to understand in which scopes they can be accessed.
Lexical scoping
______ ______ create functions based on returning inner functions that manipulate its own arguments and the arguments of the outer function.
Function factories
Data encapsulation and private methods don’t exist natively in JavaScript but can be emulated with ______ for data restriction and limited access.
closures