
Many of us have worked with JavaScript or jQuery in our projects, but that’s not enough to urge started React JS Tutorial. Before that, you wish to grasp the ES features that are commonly utilized in ReactJS. Let’s discuss the ES features.
ECMA is a corporation that has created some standards for technologies, ECMAScript(ECMA-262 Edition 4) is one of the standards for specifying scripting languages as wants to solve various domain problems. It gives certain rules and guidelines that the scripting language ECMA complaints must follow. JavaScript is that the implementation of the quality.
ES is that the abbreviation for ECMAScript. ES, followed by a variety, refers to an edition of ECMAScript. ES6 is that the most generally used. See the subsequent link for ES features and their implementation status for every version.
http://www.espruino.com/Features
Let’s bear the list of the latest ES6 features before we start with ReactJS
Understanding of var, let, and const
Before the arrival of ES6, var declarations prevailed, but since the scope of var struggles with some problems, let and const declaration types were introduced to avoid them. Let’s now take a glance at how var, let, and const differ. I’ve got provided examples for every case on the Code Pen.
Scope of Var. Code Pen
- Global level VAR can be overridden in the function level with the same VAR name.

2. Var variable can be used before it is initialized.No reference error will occur.

3. Not specific to block scope {}. This means that a VAR can be created inside a block and even accessed outside the block.

4. VAR can be re-declared and updated, the variable text is re-declared and updated to get the result as “ES6 features”.

5. Var is part of the function scope, declare a var inside a function and try to access it outside to see the “Uncaught Reference Error: description is not defined”.

Scope of let. Code Pen
- Global level let variable can be overridden in the function level with the same variable name.

2. The let variable can not be used before it is initialized. Reference error will occur.

3. The let variable was introduced specifically for the block{} section. This means that a let variable is created inside a block and the scope is only for the block. If you try to access outside Uncaught Reference, an error occurs.

4. The let variable can not be re-declared and can be updated, the let variable of text is only executed the updated to get the result as “Updated to ES6 features”.

5. let is part of the function scope, declare a let variable inside a function, and try to access it outside to see the “Uncaught Reference Error: description is not defined”.

Scope of Const. Code Pen
- Const can not be re-declared or updated. So the scope

Let us conclude the discussion of var, let, Const with comparison.

Hope it will give a clear view of variables, Please write your questions for any doubts or corrections.
Let’s discuss the next feature of ES6 in the next story.
Next topic: Arrow Functions