What is ECMAScript (ES) 6 Features of JavaScript?

What is ECMAScript 6

ECMAScript 2015 (or ES6) is the 6th major edition of the ECMAScript language that provides the standard for JavaScript implementation.

ES6 is a significant change to the JavaScript language. it has been publishing several new features such as block-scoped variables, a new loop for iterating over arrays and objects, template literals, and many other enhancements to make JavaScript programming easier and more fun. In this chapter, we will discuss some of the best ES6 features that you can use in your everyday JavaScript coding.

Features of ECMAScript (ES) 6 below is the details

  • Default Parameters in ES6
  • Template Literals in ES6
  • Multi-line Strings in ES6
  • Destructuring Assignment in ES6
  • Enhanced Object Literals in ES6
  • Arrow Functions in ES6
  • Promises in ES6
  • Block-Scoped Constructs Let and Const
  • Classes in ES6
  • Modules in ES6

i. Default Parameters in ES6

here is these statements to define the default parameters example:

var setImage = function (height, width, imageUrl) {
    var height = height || 50
    var width = width || '100'
    var imageUrl = imageUrl || https://brnfullstack.in/example.png
}

Leave a Reply

Your email address will not be published. Required fields are marked *