Home » JavaScript Symbol unscopables Property

JavaScript Symbol unscopables Property

by Online Tutorials Library

JavaScript Symbol.unscopables Properties

The Java Symbol.unscopables symbol is an object value whose inherited property names are excluded from with environment bindings.

NOTE:

  1. Setting a property to true in an unscopables object makes it unscopable and therefore it won’t appear in lexical scope variables.
  2. 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

Test it Now

Output:

1  

Example 2

Test it Now

Output:

TutorAspire  

Next TopicJavaScript Symbol

You may also like