New operators and keywords in ES6 JavaScript

1) Let Keyword Previously, using the var keyword in JavaScript caused problems in some cases. JavaScript by default moves all var declarations to the top of the scope, a process called hoisting. Introducing let prevents hoisting and keeps the variable declaration to the nearest block. Below is one issue: function…