Last active
November 14, 2018 09:26
-
-
Save shin1x1/f61266c74941c3f592d2c8a03797c4cc to your computer and use it in GitHub Desktop.
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
console.log('counter loading...'); | |
const counter = { | |
no: 0 | |
}; | |
export default counter; |
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
import counter1 from './counter'; | |
counter1.no++; | |
console.log('counter1:' + counter1.no); | |
console.log('counter2:' + counter2.no); | |
import counter2 from './counter'; | |
counter2.no++; | |
console.log('counter1:' + counter1.no); | |
console.log('counter2:' + counter2.no); |
Author
shin1x1
commented
Nov 14, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment