Modular Javascript #3 - Revealing Module Pattern Javascript Tutorial @learncodeacademy
Modular Javascript #3 - Revealing Module Pattern Javascript Tutorial  @learncodeacademy
Uploaded July 2015 | Updated September 2026, 1 week ago
The revealing module pattern allows us to create private variables in a Javascript Module.
Here's a writeup on this pattern:
addyosmani.com/resources/essentialjsdesignpatterns/book/#revealingmodulepatternjavascript
Here's the code for this video:
codepen.io/anon/pen/ZGoKYN?editors=101
Here's video 1 in case you missed it:
youtube.com/watch?v=HkFlM73G-hk&index=18&list=PLoYCgNOIyGACnrXwo5HMCfOH9VT05znGv

We write a revealing module pattern by starting with a self-executing anonymous function also known as an IIFE (immediately invoked function expression).

This runs a function and sets it's return value as our module's value. If we return an object of methods, then those methods are what other modules have "public" access to. What's nice about this, is we can create any variables within the function and no other modules have access to them unless we expose them via our return object.

Modular JS #1 - Object Literal Pattern pt 1:
youtube.com/watch?v=HkFlM73G-hk&index=1&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f

Modular JS #2 - Object Literal Pattern pt 2:
youtube.com/watch?v=m-NYyst_tiY&index=2&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f

Modular JS #3 - Revealing Module Pattern:
youtube.com/watch?v=pOfwp6VlnlM&index=3&list=PLoYCgNOIyGABs-wDaaxChu82q_xQgUb4f

-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
youtube.com/watch?v=fgOO9YUFlGI
-~-~~-~~~-~~-~-
Modular Javascript #3 - Revealing Module Pattern Javascript TutorialWhat is Node.js Exactly? - a beginners introduction to NodejsLive Reload Sublime, Chrome, Anything - Fast and easy with Live-ServerREACT JS TUTORIAL #4 - State vs Props & Application DataCSS Tutorial - Web Development Tutorial for Beginners (#5)MOST AMAZING ERGODOX YET! - ERGODOX EZ GLOW REVIEW w/ Kailh Copper keyswitches[April Fools 2017] ES2018 First Look - it changes everything2016/2017 MUST-KNOW WEB DEVELOPMENT TECH - Watch this if you want to be a web developerModular Javascript #6 - Classical Inheritance & OOP with JSVue Tutorial #3 - Vue.js directives and event listenersCSS Units - Which ones to use and which to stop using! - HTML CSS TutorialScaling Docker #2 - Tutorial on Scheduling Docker Containers across CoreOS machine with Fleet
LearnCode.academy |

Modular Javascript #3 - Revealing Module Pattern Javascript Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER