ES5 vs ES6

ES5 vs ES6

Normal function vs Arrow function

String interpolation

Destructuring

Merging Objects

Default

Promises vs Callbacks

Var, let, and const

Exporting & Importing Modules

export const x = 1;
export const y = 2;
import {x, y} from './module';
const x= () => {
name:'Sher'
}
export default x;
import x from './module
  1. You can have only one default export per file.
  2. The naming of import is completely independent when you are using default export and you can use any name you like.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store