mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 19:27:57 -05:00
Add symbol as a primitive type
- Also add note that symbols cannot by polyfilled and should not be used in environments that don't support them
This commit is contained in:
@@ -68,6 +68,7 @@ Other Style Guides
|
||||
- `boolean`
|
||||
- `null`
|
||||
- `undefined`
|
||||
- `symbol`
|
||||
|
||||
```javascript
|
||||
const foo = 1;
|
||||
@@ -78,6 +79,8 @@ Other Style Guides
|
||||
console.log(foo, bar); // => 1, 9
|
||||
```
|
||||
|
||||
- Symbols cannot be faithfully polyfilled, so they should not be used when targeting browsers/environments that don't support them natively.
|
||||
|
||||
<a name="types--complex"></a><a name="1.2"></a>
|
||||
- [1.2](#types--complex) **Complex**: When you access a complex type you work on a reference to its value.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user