Expo Docs

Using Modern JavaScript

JavaScript is an evolving language. You may have heard of ES2015, ES2016, and so on, which are new versions of JavaScript that have added features like classes, async functions, and more.
You can use much of modern JavaScript with Expo and React Native. The JavaScript VMs on devices already support many modern features. The JavaScript packager (Metro) also uses Babel to transform modern JavaScript into an older version that JavaScript VMs can interpret. Between newer JavaScript VMs and Babel, you can use many features of modern JavaScript.

On iOS, Expo uses the JavaScriptCore VM that is part of iOS. This means that different versions of iOS have different versions of JavaScriptCore. The newer versions support more features.
On Android, Expo includes its own copy of JavaScriptCore. This means that Expo projects have the same JavaScript features across all Android devices. Expo's version of JavaScriptCore is similar to that included with iOS 8.

Some parts of the modern JavaScript API are implemented in polyfills. These polyfills are included in your JavaScript bundle by Metro.
Before your code runs in your app, Metro also transforms your code and your dependencies with Babel. By default, Expo projects define a preset Babel configuration (babel-preset-expo) based on the React Native preset (babel-preset-react-native).

FeatureWorks with ExpoLinksSpecImplementation
Object rest/spreadMDN
2ality
ProposalBabel
No JSC support
Class propertiesTC39 ProposalProposalBabel
No JSC support
Revised template literals (lenient escape sequences)MDN
2ality
ES2018JSC support: iOS 11
Async functions (async/await)MDN
Exploring ES2017
ES2017Babel with Regenerator
JSC support: Android, iOS 10.3+
Trailing commas in function calls and signaturesMDN
Exploring ES2017
ES2017Babel
JSC support: Android, iOS 10.3+
Shared memory (SharedArrayBuffer, Atomics)⚠️
(Android and iOS 10.3+, iOS 10.3 doesn't implement byteLength)
MDN (SharedArrayBuffer)
MDN (Atomics)
Exploring ES2017
ES2017JSC support: Android, iOS 10.3+
Object static methods (entries, values, getOwnPropertyDescriptors)⚠️
(Android and iOS 10+, and only Object.entries and Object.values on iOS 9)
MDN
Exploring ES2017 (entries, values)
Exploring ES2017 (getOwnPropertyDescriptors)
ES2017Polyfills for Object.entries and Object.values
JSC support: Android, iOS 10.3+
String instance methods (padStart, padEnd)⚠️
(Android and iOS 10+)
MDN
Exploring ES2017
ES2017JSC support: Android, iOS 10+
Proxy ownKeys handler⚠️
(Android and iOS 10+)
MDNES2017JSC support: Android, iOS 10+
Exponentiation operator (**)MDN
Exploring ES2017
ES2016Babel
JSC support: Android, iOS 10.3+
Destructuring nested rest declarationsMDNES2016Babel
JSC support: Android, iOS 10.3+
Array.prototype.includesMDN
Exploring ES2016
ES2016Polyfilled
JSC support: Android, iOS 9+
forof loopsMDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9+
Array instance methods (entries, keys, values, find, findIndex, copyWithin, fill)MDN
Exploring ES6
ES2015Some methods have polyfills
JSC support: Android, iOS 9+
Octal and binary literalsExploring ES6ES2015Babel
JSC support: Android, iOS 9+
Number static properties and methods (EPSILON, MINSAFEINTEGER, MAXSAFEINTEGER, isInteger, isSafeInteger, isNaN, isFinite, parseInt, parseFloat)MDN
Exploring ES6
ES2015Some properties and methods have polyfills
JSC support: Android, iOS 9+
Math static methods (sign, trunc, cbrt, expm1, log1p, log2, log10, fround, imul, clz32, sinh, cosh, tanh, asinh, acosh, atanh, hypot)MDN
Exploring ES6
ES2015JSC support: Android, iOS 9+
Unicode code point escapesExploring ES6ES2015Babel, in string literals
JSC support: Android, iOS 9+
String instance methods (codePointAt, normalize, startsWith, endsWith, includes, repeat)MDN
Exploring ES6
ES2015Some methods have polyfills
JSC support: Android, iOS 9+
String static methods (raw, fromCodePoint)MDN
Exploring ES6
ES2015JSC support: Android, iOS 9+
SymbolsMDN
Exploring ES6
ES2015JSC support: Android, iOS 9+
Template literals (including tags)MDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9+
Block scoping (let, const)MDN
MDN (let)
MDN (const)
2ality
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9+
Destructuring syntaxMDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9 (partially), iOS 10+
Default parameter valuesMDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 10+
Rest parameters (...)MDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 10+
Spread syntax (...)MDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9 (partially), iOS 10+
Function name propertyMDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9 (partially), iOS 10+
new.target⚠️
(Android and iOS 10+)
MDN
Exploring ES6
ES2015JSC support: Android, iOS 10+
Arrow functionsMDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 10+
Object static methods (assign, is, setPrototypeOf, getOwnPropertySymbols)MDN
Exploring ES6
ES2015Polyfill for Object.assign (overrides native implementation with stricter one)
JSC support: Android, iOS 9+
Shorthand for object methodsMDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9+
Shorthand for object propertiesMDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9+
Computed properties and methodsMDN
Exploring ES6 (properties)
Exploring ES6 (methods)
ES2015Babel
JSC support: Android, iOS 9 (partially), iOS 10+
ClassesMDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 9 (partially), iOS 10+
Modules (import, export)MDN (import)
MDN (export)
Exploring ES6
ES2015Babel
Natively supported on Android and iOS 10+ but we always use Babel's implementation
MapMDN
Exploring ES6
ES2015Polyfilled
JSC support: Android, iOS 9+
SetMDN
Exploring ES6
ES2015Polyfilled
JSC support: Android, iOS 9+
WeakMapMDN
Exploring ES6
ES2015JSC support: Android, iOS 9+
WeakSetMDN
Exploring ES6
ES2015JSC support: Android, iOS 9+
Typed arrays (ArrayBuffers, DataViews)MDN
Exploring ES6
ES2015Polyfilled on iOS 9
JSC support: Android, iOS 9 (partially), iOS 10+
Generators (function*)MDN
Exploring ES6
ES2015Babel
JSC support: Android, iOS 10+
RegExp y and u flags⚠️
(Android and iOS 10+)
MDN
Exploring ES6 (sticky "y")
Exploring ES6 (unicode "u")
ES2015JSC support: Android, iOS 10+
RegExp.prototype.flagsMDN
Exploring ES6
ES2015JSC support: Android, iOS 9+
PromisesMDN
Exploring ES6
ES2015Polyfill overrides native implementation
JSC support: Android, iOS 9+
Proxy⚠️
(Android and iOS 10+)
MDN
Exploring ES6
ES2015JSC support: Android, iOS 10+
Reflect (object introspection)⚠️
(Android and iOS 10+)
MDN
Exploring ES6
ES2015JSC support: Android, iOS 10+
Tail call optimizationExploring ES6
2ality
ES2015JSC support: Android, iOS 9+

WebAssembly, or WASM for short, is a low-level language implemented in JavaScript interpreters. WebAssembly is not JavaScript, but WebAssembly code can interact with JavaScript code in the same program. Currently, Expo does not support WebAssembly.