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