Supported JavaScript
The Aura Components programming model supports ES5 syntax and ES6 Promises.
For the most reliable experience, use ES5 to develop Aura components because the pipeline from authoring to serialization to execution was built for ES5. Promises from ES6 are also available. Using any other syntax or feature is not supported.
This developer guide explains how to develop Aura components and documents the JavaScript usage that's unique to the Aura Components programming model.
If you want to use ES6 or later for development, use the Lightning Web Components programming model, which has been architected for modern JavaScript development.