Domain modeling is a way of conceptualising code before actually writing any which describes the different parts of the script along with their attributes and behaviours. This is important as it allows for technically minded and non-technically minded people to to discuss a problem and the eventual solution.
In HTML tables shouldn’t be used for layouts because:
Three semantic table elements are:
In JavaScript a constructor is a function that creates a new object , and is called using the new keyword. For instance:
function Cat(name){
this.name = name;
this.meow = function (){
alert(`My name is ${name}. Meow!`)
}
}
const whisper = new Cat("Whisper");
With constructors the this keyword is bound to the new object so it can be used in the creation of the new object.
Prototype can be used to alter an existing object without redeclaring it, for instance:
function Cat(name){
this.name = name;
this.meow = function (){
alert(`My name is ${name}. Meow!`)
}
}
Cat.prototype.family = "Felidae"