Module Pattern
How do I make an module pattern?
What is a module pattern? How do you make a module pattern? This script and codes were developed by MoyArt Maximus on 09 July 2022, Saturday.
Module Pattern - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Module Pattern</title>
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
Module Pattern - Script Codes JS Codes
/*Para entender el Module Pattern comenzamos con una funcion que se invoca inmediatamente, tambien conocidas como IIFE
(function(){ //codigo
})() */
var Modulo = (function(){ //Metodo Privado var privateMethod = function(mensaje){ console.log(mensaje); }; //Metodo Publico var publicMethod = function(text){ privateMethod(text); }; return { publicMethod: publicMethod };
})();
//Podemos acceder a nuestro metodo privado por medio de nuestro metodo publico
Modulo.publicMethod('Abuuuuget!!');
ModuloDos = (function(Modulo){ Modulo.extension = function(){ console.log("Choryuuuukeeen") }; return Modulo;
})(Modulo || {});
![Module Pattern - Script Codes](http://shots.codepen.io/MoyArt/pen/VpWXVX-512.jpg)
Developer | MoyArt Maximus |
Username | MoyArt |
Uploaded | July 09, 2022 |
Rating | 3 |
Size | 1,615 Kb |
Views | 48,576 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Formularios html | 1,679 Kb |
Cookies | 1,469 Kb |
Elementos Semanticos | 1,619 Kb |
Spoiler Revealer | 2,023 Kb |
Jquery AJAX Methods | 2,957 Kb |
Select con paises | 3,739 Kb |
Simple jQuery Toggle Menu | 1,962 Kb |
Ejercicio Polymer | 1,566 Kb |
Todo List | 1,671 Kb |
JQuery Array Looping | 1,812 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Myprofile | SoufianeAbid | 2,451 Kb |
Basic jQuery Filter list | Mtedwards | 2,464 Kb |
Console fun | Dviate | 1,500 Kb |
Hovers with popups | Zacharyolson | 2,380 Kb |
Ball physics | Blackkbot | 3,874 Kb |
Two column of responsive height | Fixie | 2,908 Kb |
Rotate Demo | Agelber | 3,061 Kb |
A Pen by Oliver Schafeld | Schafeld | 1,720 Kb |
Canvas stripes | Adrianparr | 1,948 Kb |
Savemedia1.1 | EdsonAlcala | 2,148 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!