Can a named export be an object with methods?

Question

Can a named export be an object with methods?

Answer

Most definitely! Our named exports can be all different data types and structures, including objects with methods.

12 Likes

Does scoping apply to the import statement?

1 Like

Yes it does! You will only be able to access those objects(exported in the export file) which you have explicitly imported in the import file. Unless the object you’re importing is using another not-export object within the export file.

Please refer to the thread below for a better understanding:

1 Like