1) ES5:- It is the 5th edition of Echma Script.
ES6:- It is the 6th edition of Echma Script.
2) Datatypes:- ES5:- It is used number,string,null,undefined,boolean
ES6:- It is added aditional feature “symbol” data type
3) Variable declaration:- ES5:- it is used only var keyword.
ES6:- it is introduced new keywords let and const.
4) Arrow function:- ES6:- it is introduced Arrow function so there is no need function write.
5) loop:- ES5:- It has for loop.
ES6:- It is introduced new loop “for of”
Difference between ES5 and ES6 – Objective Questions (MCQs)
Q1. Which version introduced let and const?
Q2. Arrow functions were introduced in ______.
Q3. Which keyword is used for block-scoped variables in ES6?
Q4. Which feature is available in ES6 but NOT in ES5?
Q5. Which statement about ES6 modules is correct?