ts.
ts.

Reputation: 10709

finding if Javascript function has a closure

Is there a way to find if given function reference has a closure and eventually to access to closed variables? I was searching for something similiar to "arguments" property, but in vain.

Edit : outside or inside given function

Upvotes: 1

Views: 199

Answers (1)

Joseph
Joseph

Reputation: 119847

Nope, you will never know. That's why closures are used to emulate private members, since you never know what's inside, hence "private".

Upvotes: 1

Related Questions