idev0085 / react-boilerplate

0 stars 0 forks source link

clouser function javascript #122

Open idev0085 opened 1 year ago

idev0085 commented 1 year ago

In JavaScript, closures are the primary mechanism used to enable data privacy. When you use closures for data privacy, the enclosed variables are only in scope within the containing (outer) function. You can't get at the data from an outside scope except through the object's privileged methods.