What are the features in ES6?
  • let and const keywords
  • Multi-line strings
  • Template literals
  • Default parameters
  • Arrow functions
  • Destructuring assignment
  • Enhanced object literals
  • Promises
  • Classes
  • Modules
Difference between Let and Const keywords?
  • Block scope variables can not accessed from outside the block
  • let can not be redeclared.
  • let variables must be declared before use.
  • const can not be redeclared and reassigned.
What is the purpose of multi-line strings in ES6?
    ES6 also provides Multi-line Strings. Users can create multi-line strings by using back-ticks(`).

let greeting = `Hello World,     
           Greetings to all,
           Keep Learning and Practicing!`

What is the use of Template Literals in ES6?
    ES6 introduced template literals for rendering dynamic inputs inside with a back-ticked(`) operator and the variables come up with ${parameter}

What is use of Default Parameters in ES6?
    ES6 introduced a default parameter used to assign the default values in the function parameters.
    let areaCalculation = function (x = 10, y = 15) {
    return x * y;
}

What are the advantages of the arrow function?
  • arrow functions do not have their own binding to this, argument or super  and should not be used as a method.
  • arrow functions aren't suitable for call, apply, or bind methods and  generally rely on establishing a scope.
  • arrow functions cannot be used as Constructor.
  • arrow functions cannot use yield in its body.
What are the disadvantages of arrow function?    
  • It should not be used as methods.
  • It can not be used as constructors.
  • It can not use yield within its body.
  • It cannot be suitable for call, apply and bind methods.
Difference between Arrow function and Normal function?
  • No arguments object in arrow function.
  • It doesn’t create their own `this` binding.
  • It cannot be accessed before initialization.