
With a lot of forward-thinking features (ES6) attached to it, JavaScript is an exciting language to program.ĮS6 is the basis for modern programming languages like Angular and ReactJs. ES6 has many new features that can help a developer understand and write code more efficiently. The findIndex() Array method is similar to find(), but it will return the first index of the matching value.ES6 is a new standardized version of javascript that was released in 2015. Assign a variable var color = 'blue' let animal = 'lion' if ( true ) A var is function-scoped, meaning only functions will introduce a new scope. There are a few important differences between the new keywords and the previously existing var keyword.īoth let and const are block-scoped, meaning the variable can be scoped to any block, such as if, for, or while. Now you can also assign values with let and const. Previously, there was only one way to declare a variable in JavaScript – the var statement. One of the most important new additions of ES6 are let and const statements. In this article, we’ll go over some of the most commonly used features of ES6. You can still write all the same JavaScript code from the previous versions, but new syntax and features are now available. It’s important to note that ES6 is not a different language, but simply the next version of ECMAScript, much like HTML5 is the next edition of HTML. It is still the common convention to use a bundler like webpack to run Babel and compile ES6 down to code that older browsers can understand, but according to Can I Use, around 90% of all browsers can natively understand ES6 syntax.

When ES6 was first introduced, the features were not available on the vast majority of browsers, and it was necessary to use a compiler like Babel if you wanted to utilize any of the features. This version is commonly known as ECMAScript2015 or ES6.

The sixth edition of ECMAScript – the scripting language specification by which JavaScript is standardized – introduced many new features, upgrades, and shortcuts to the JavaScript programming language. Learn about the new ES6 features, enhancements, and shortcuts introduced to the JavaScript programming language.
