| ES5 is the fifth edition of the ECMAScript which was introduced in 2009. | ES6 is the sixth edition of the ECMAScript which was introduced in 2015. |
| Primitive data types that are string, boolean, number, null, and undefined are supported by ES5. | There are a few additions to the JavaScript data types in ES6. For supporting UNIQUE values, a new primitive data TYPE 'symbol' was introduced. |
| In ES5, we could define the variables by using the var keyword only. | In ES6, in ADDITION to var, there are two new methods to define variables: LET and const. |
| Both function and return keywords are used in order to define a function in ES5. | An arrow function is a newly added feature in ES6 in which we don't REQUIRE the function keyword in order to define the function. |
| In ES5, a for loop is used to iterate over elements. | ES6 introduced the idea of for...of loop in order to iterate over the values of the iterable objects. |