-
-
Save philcon93/2ebefe7c87e1cca6cb0014e0399e6aa0 to your computer and use it in GitHub Desktop.
Revealing Module Pattern with import/export
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
export addressBook = (function(){ | |
var phil = 'phil'; | |
return{ | |
billingAddress: 'QLD' | |
}; | |
})() | |
export addToCart = (function(){ | |
var phil = 'phil'; | |
return{ | |
cartId: '123' | |
}; | |
})() | |
import addressBook from './addressbook.js' | |
import addToCart from './addtocart.js' | |
var neto = (function(){ | |
aaa = 2+2; | |
return{ | |
addressbook: addressBook, | |
addtocart : addToCart | |
bbb : 1+1 | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment