add exponentiation operator

This commit is contained in:
Sebastian McKenzie
2014-11-23 22:55:20 +11:00
parent b599e2c794
commit fafdb1a18a
11 changed files with 40 additions and 1 deletions

View File

@@ -78,6 +78,7 @@ better suited if you'd like a full ES6 environment with polyfills and all.
| Constants | ✓ | ✓ | ✓ | | | |
| Default parameters | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Destructuring | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Exponentiation operator | ✓ | ✓ | | | | |
| For-of | ✓ | ✓ | ✓ | ✓ | ✓ | |
| Generators | ✓ | ✓ | | ✓ | | |
| Generator comprehension | ✓ | ✓ | | | | |

View File

@@ -130,6 +130,15 @@ var [a] = [];
a === undefined;
```
## Exponentiation operator ([experimental](usage.md#experimental)) ([spec](https://github.com/rwaldron/exponentiation-operator))
```javascript
var a = 2;
a **= 2;
var squared = 2 ** 2;
```
## For-of
```javascript

View File

@@ -40,6 +40,7 @@ And it doesn't end here! To see all the ways you can use 6to5, check out the
- [Constants](features.md#constants)
- [Default parameters](features.md#default-parameters)
- [Destructuring](features.md#destructuring)
- [Exponentiation operator](features.md#exponentiation-operator) ([experimental](usage.md#experimental))
- [For-of](features.md#for-of)
- [Generators](features.md#generators)
- [Generator comprehension](features.md#generator-comprehension) ([experimental](usage.md#experimental))