Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 454 Bytes

File metadata and controls

9 lines (5 loc) · 454 Bytes

Import and Export a Function with Parameter using Common JS Module Syntax

Create two files exportFunctionWithParameter.js, importFunctionWithParameter.js parallel to README.md file.

Write a JS function that accepts a number and returns its square, in the file exportFunctionWithParameter.js and export it using the default export syntax.

Import the function in the importFunctionWithParameter.js file.

Use Common JS module syntax.