Skip to content

shahrishabhptechnical/javascript-design-pattern-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Design Pattern Examples

This repository contains JavaScript Design Pattern examples. There are 4 design patterns in JavaScript

Module Pattern Examples

module-pattern/app.js and module-pattern/app1.js files

Execution in browser sconsole: WebNotification.showNotification("Hello World!");

output: alert message with Hello World!

WebNotification.showNotification();

output: alert message with Default Message;

ProtoType Pattern Examples

prototype-pattern/app.js

Execution in browser sconsole: var wn = new WebNotification();

wn.showNotification("Hello World!"); output: alert message with Hello World

wn.showNotification(); output: alert message with Default Message;

Observer Pattern Examples

Singleton Pattern Examples

var wn = WebNotification.getInstance(); wn.showNotification();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published