Module Pattern

Size
1,615 Kb
Views
48,576

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 Previews

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
Module Pattern - Script Codes
Home Page Home
Developer MoyArt Maximus
Username MoyArt
Uploaded July 09, 2022
Rating 3
Size 1,615 Kb
Views 48,576
Do you need developer help for Module Pattern?

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!

MoyArt Maximus (MoyArt) Script Codes
Create amazing Facebook ads with AI!

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!