Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Application = (() => {
- const privateVariable = 'Private content'
- const link = document.querySelector('.link')
- const _private = {
- cache: () => (this.link = document.querySelector('.link'))
- bind: () => this.link.addEventListener('click', this.shoshowContentwVariableContent, false),
- showContent: () => console.log(privateVariable)
- }
- return {
- init: () => {
- _private.showContent()
- _private.cache()
- _private.bind()
- }
- }
- })()
- Application.init() //
- console.log(privateVariable) //undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement