92
JavaScript Symbol.unscopables Properties
The Java Symbol.unscopables symbol is an object value whose inherited property names are excluded from with environment bindings.
NOTE:
- Setting a property to true in an unscopables object makes it unscopable and therefore it won’t appear in lexical scope variables.
- Setting a property to false makes it scopable and thus it will appear in lexical scope variables.
Syntax
Parameters
Object.
Return value
Check the variable appear in lexical scope variable.
Browser Support
Chrome | 32 |
Safari | 8 |
Firefox | 29 |
Opera | 19 |
Example 1
Output:
1
Example 2
Output:
TutorAspire
Next TopicJavaScript Symbol