factory
):
function createPokemon(name, type){
let object = {
name: name,
type: type,
}
return object
}
function Pokemon(name, type) {
this.name = name;
this.type = type;
}
new
keyword, as follows:
let squirtle = new Pokemon('Squirty', 'water');
##
The DOM, objects and tables are all fundamental parts of what goes into building a dynamically generated website.
Domain modeling is the process of creating a conceptual model for a specific problem. The more efficiently we can solve the problem, the less resources ones application will run (e.g. an objects prototype when it runs more than once)
They are not responsive, and don’t transfer well to different screen sizes
<th>, <td>, <tr>
Table Header, Table Data, Table Row
constructor is a special method used to initialize and create objects of a class, they are more efficient.
this
differ when used in an object literal versus when used in a constructor?
- In an object literal, the term “this” refers to the object itself, representing the current instance of the object within the object’s scope. It allows you to access and modify properties and methods of the object.
- In a constructor, the term “this” also refers to the object being created, but it represents the new instance being constructed, rather than an existing instance. It allows you to set and initialize properties and methods for the newly created object during the construction process.
Object Prototypes Using A Constructor
- Prototypes: protocols for assessing risk in customers based on the law
- Inheritence: business-specific (or even anecdotal) playbooks for different customers in different sectors