Created
September 10, 2017 03:44
-
-
Save StevenJL/29e35c069c20531cdc8a49c70dc45813 to your computer and use it in GitHub Desktop.
modules
This file contains hidden or 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
| // lib/math.js | |
| export function sum(x, y) { return x + y; } | |
| export var pi = 3.14159 | |
| // myApp.js | |
| import {sum, pi} from "lib/math" | |
| sum(pi, pi); | |
| // otherApp.js | |
| import * as math from "lib/math" | |
| sum(pi, pi); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment