We can export things one member(class, function, or variable) at a time
Things that aren’t exported aren’t available outside the module. This is a way of scoping certain variables, functions to a module, so that it doesn’t collide when you import it.
Look at how in this example we hid the logger x, so now we can define a new logger function in an external file without variable naming collision.
Here’s a more concise syntax where we can remove the export from the left of the members.
Exporting by Alias
We can also give these members a name that’s different from how their defined in the source file (file were exporting from).
You can also export by default. We’ll get into later, but it makes importing easier
Now let’s get into how we import these members in our target file
Importing with Alias
We can also set the alias name in the import to further avoid conflicts in the namespace.
We can also just import all members with * then access it with .notation