learning javascript
difference between let vs var vs const
- const is static value and cant be changed. global scope
- var is scoped to the immediate body
var does hoisting, which is automatically putting the declaration of the variable on top of the file (first line). - let are scoped to the immediate enclosing
default exports
'export default' is used if you want to export a single thing for a module.
In default export the naming of import is completely independent and we can use any name we like.