http://www.unheap.com http://plugins.jquery.com http://www.jsdb.io http://microjs.com http://www.jqueryrain.com Do I missing something? Yes, for sure!. Please send me your links to: developer@leolanese.com
Creating Objects on JS
There are few interesting ways to create Objects on JS Creating Objects on JS Constructor function (classical inheritance pattern)
1 |
function myObject(){}; |
Literal notation (prototypal inheritance pattern)
1 |
var myObject={}; |
Object-Based (ES5)
1 |
Object.create() |
DEFINING Methods and Properties: Constructor Way
1 2 3 4 5 6 |
function myObject(){ this.iAm = 'an Object'; this.iAmFun = function(){ alert('this.iAm') } } |
Literal Way
1 2 3 4 5 6 |
var myObject = { iAm: 'an Object', iAmFun: function(){ alert(this.iAm); } } |
Object-basedRead more…
The javascript Module Pattern
Benefits The Module Pattern keeps things very simple and easy to read and use. We can use Objects in a very cool way, and doesn’t make swollen your code with repetitive “this” and “prototype” declarations. Starting with the Module InRead more…
Immediately-Invoked Function Expression Pattern (IIFE)
What is an “Immediately-Invoked Function Expression” (IIFE)? is a JavaScript design pattern which produces a lexical scope using JavaScript’s function scoping. “Immediately-invoked function” expressions can be used to avoid variable hoisting from within blocks, protect against polluting the global environmentRead more…