Closures can help in creating data _________ by providing data privacy and are used to create factory functions for building similar objects.

  • Encapsulation
  • Abstraction
  • Inheritance
  • Isolation
Closures provide a form of data isolation, which is essential for data privacy in JavaScript. They allow you to encapsulate data within a function's scope, making it inaccessible from the outside, thus achieving data isolation and privacy. This concept is often used in creating factory functions.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *