Coggle requires JavaScript to display documents.
const newObj = {};
const newObj = Object.create( Object.prototype );
const newObj = new Object();
newObj.somekey = 'Hello world'
newObj['somekey'] = 'Hello world'
function Man ( name, age) { }
Man.toString()
Object.prototype.somefunction
var myNamespace = (function () { })();
return { myPublicVar: 'foo', ... }
var myPrivateVar, myPrivateMethod;
setTimeout()
setInterval()
eval()
Object
(this is a particularly bad anti-pattern)
document.write
document.createElement
Class Factory Method - This makes an instance of several derived classes based on interfaced data or events Object Abstract Factory - Creates an instance of several families of classes without detailing concrete classesBuilder - Separates object construction from its representation, always creates the same type of objectPrototype - A fully initialized instance used for copying or cloningSingleton - A class with only a single instance with global access points
Factory Method - This makes an instance of several derived classes based on interfaced data or events
Abstract Factory - Creates an instance of several families of classes without detailing concrete classesBuilder - Separates object construction from its representation, always creates the same type of objectPrototype - A fully initialized instance used for copying or cloningSingleton - A class with only a single instance with global access points
Class Adapter - Match interfaces of different classes, therefore, classes can work together despite incompatible interfaces Object Bridge - Separates an object's interface from its implementation so the two can vary independentlyComposite - A structure of simple and composite objects which makes the total object more than just the sum of its partsDecorator - Dynamically add alternate processing to objectsFacade - A single class that hides the complexity of an entire subsystemFlyweight - A fine-grained instance used for efficient sharing of information that is contained elsewhereProxy - A placeholder object representing the true object
Adapter - Match interfaces of different classes, therefore, classes can work together despite incompatible interfaces
Bridge - Separates an object's interface from its implementation so the two can vary independentlyComposite - A structure of simple and composite objects which makes the total object more than just the sum of its partsDecorator - Dynamically add alternate processing to objectsFacade - A single class that hides the complexity of an entire subsystemFlyweight - A fine-grained instance used for efficient sharing of information that is contained elsewhereProxy - A placeholder object representing the true object
Class Interpreter - A way to include language elements in an application to match the grammar of the intended languageTemplate Method - Creates the shell of an algorithm in a method, then defer the exact steps to a subclass Object Chain of Responsibility - A way of passing a request between a chain of objects to find the object that can handle the requestCommand - Encapsulate a command request as an object to enable, logging and/or queuing of requests, and provides error-handling for unhandled requestsIterator - Sequentially access the elements of a collection without knowing the inner workings of the collectionMediator - Defines simplified communication between classes to prevent a group of classes from referring explicitly to each otherMemento - Capture an object's internal state to be able to restore it laterObserver - A way of notifying a change to a number of classes to ensure consistency between the classesState - Alter an object's behavior when its state changesStrategy - Encapsulate an algorithm inside a class separating the selection from the implementationVisitor - Adds a new operation to a class without changing the class
Interpreter - A way to include language elements in an application to match the grammar of the intended languageTemplate Method - Creates the shell of an algorithm in a method, then defer the exact steps to a subclass
Chain of Responsibility - A way of passing a request between a chain of objects to find the object that can handle the requestCommand - Encapsulate a command request as an object to enable, logging and/or queuing of requests, and provides error-handling for unhandled requestsIterator - Sequentially access the elements of a collection without knowing the inner workings of the collectionMediator - Defines simplified communication between classes to prevent a group of classes from referring explicitly to each otherMemento - Capture an object's internal state to be able to restore it laterObserver - A way of notifying a change to a number of classes to ensure consistency between the classesState - Alter an object's behavior when its state changesStrategy - Encapsulate an algorithm inside a class separating the selection from the implementationVisitor - Adds a new operation to a class without changing the class
React.Component