- Let : Variable values
- const: Constant values
const myFunction = (param) => {
...
}
Is equivalent to
function myFunction(param){
...
}
Arrow function will not change the context at runtime so no need of 'this' keyword into arrow function
const person = {
return 'max';
}
export default person;
export const clean = () =>{
...
}
export const baseData = 10;
- Import the default exported. We can give any name like person or man.
import person from './person.js';
- It is called named import. we need to give exact name as given at the time of export. We can import more then one exported value into one statement by sperate it in comma.
import {clean} from './utility.js';
- Here we import all the exorted values.
import * as util from './utility.js';