Last active
March 29, 2020 03:04
-
-
Save kodetop/49919820ee38b5ce1fba091719d6a98f to your computer and use it in GitHub Desktop.
ES6: module export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file: areas.js | |
let squareArea = (width) => { | |
return width * width; | |
}; | |
let circleArea = (radio) => { | |
return 2 * Math.PI * radio; | |
}; | |
// export methods | |
export { squareArea, circleArea }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment