Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 398 Bytes

File metadata and controls

8 lines (5 loc) · 398 Bytes

Question 5:

You are building a JavaScript application and want to reuse a function that calculates the area of a rectangle. This function is defined in a separate file named shapes.js. How would you import this function into your main JavaScript file to use it?

Bonus: Explain the difference between named exports and the default export in this scenario.


Your answer here