Tables are used to hold tabular data and that is its purpose. It is also because they are not responsive, and can reduce accessibility for the visually impared.
<table>
.
tr
is the Table Row Element. It is used to specify what other elements are all on the same lineth
is the table header. This denotes that an element is a header and not just a regular cell.td
is the table data. This holds all the data for the table.
constructor functions are used to create new objects. Some advantages of using constructors is it makes it so much easier to create a new class.
this
in object literals refer to the object it is currently in. With constructors,this
gets created when we call the constructor function with the new keyword.
When our office got a new financial management system, the consultants came and create “template” roles for existing and key users. After the initial setup, whenever a member of the enterprise software support team needs to create a new user, they would just create a new user based on an existing role that already exists. Prototypes are the Templates or roles we copy and inheritances are the new users inheriting the same properties, roles, restrictions.
NOTE: This is a very common front end developer interview question
Bookmark and Review HTML Table Advanced Features and Accessibility
Constructor Functions - A Function that creates objects for us. Typing less & if we know what properties an object has, we can just define those properties in a function so we can create “duplicates” with different values
function Constructor(arg1, arg2){
this.object1 = arg1; // uses = to assign to `this` and not `:`
this.object2 = arg2;
//doesnt need a return
}
new Constructor(arg1, arg2);
Object that is inheritied by every object created by constructor. Single place to define property and behaviors that are shared by all object
if a function is used everywhere, make it a prototype.