Andrew's Cache

Home Archives
2013-09-02

JavaScript Module Pattern

Just a simple code and note here.

For more info about module pattern refer here.

1
2
3
4
5
6
7
8
9
10
11
var obj = (function(){
var obj = function(){
//constructor
}

obj.prototype.foobar = function() {
// do things here
};

return obj;
})();
Share
  • javascript
Newer
Differences Between sync & async, blocking & non-blocing and event-driven
Older
How To Call Parent Function in Child Class

Archives

  • 2023
  • 2020
  • 2017
  • 2016
  • 2015
  • 2013

Tags

  • AJAX
  • CORS
  • FP
  • GraphQL
  • HTML
  • HTTP/HTTPS
  • PWA
  • REST
  • architecture
  • backend
  • concurrent
  • frontend
  • git
  • interview
  • javascript
  • meta
  • mobile
  • network
  • octopress
  • programming
  • redux
  • testing
  • web
  • websocket

Recent Posts

  • A cheatsheet of the git submodule command
  • How to resolve timeout when cloning mega-sized repository with git
  • Assignments Design Guide - Candidate Perspective
  • GraphQL vs REST - My Review
  • A Learning Note of Functional Programming Part 2 - Some Common Terminology
© 2023 Andrew Yan
Powered by Hexo
Home Archives