ES6 added arrow functions, which use => as their token and are similar to lambda functions in programming languages like java 8 and python. ES6 also introduced Promises, which help handle Asynchronous Programming in a cleaner way than callbacks. Earlier, async calls were handled by nested callbacks resulting in what is commonly known as callback hell. Promises resolved this issue by introducing a simpler syntax that includes a pending, resolved, and rejected state. The async and await keywords are used with promises to make asynchronous code easier to write.
In es7, we saw the addition of the exponention operator, which raises the first operand to the power of the second operand. It also added the Array. includes() method, which helps check if the value passed as the boundary exists in the cluster.
Other notable features of ES7 include the let and const k
eywords, which offer shorter, more concise ways to declare variables in JS. Let is used for variables that can change, while const is for constant values that cannot be changed. In es7 we also got immutable objects, block scope, and string templates that handle interpolation for you.Read More »