Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.85 KB

201read05.md

File metadata and controls

35 lines (24 loc) · 1.85 KB

Objects

Objects group together a set of variables and functions to create a model of a something you would recognize from the real world. In an object, variables and functions take on new names.

IN AN OBJECT VARIABLES (things that are declered as let or var) BECOME KNOWN AS PROPERTIES If a variable is part of an object, it is called a property. Properties tell us about the object, such as the name of a hotel or the number of rooms it has. Each individual hotel might have a different name and a different number of rooms

an example:

var hote l = { name: 'Quay', rooms: 40, booked : 25, checkAvailability: function() { return this.rooms - this.booked; } } ; JAVASCRIPT var el Name = document .getElementByld('hotelName'); elName.textContent =hotel .name; var elRooms = document.getElementByid{'rooms'); elRooms.textContent = hotel .checkAvailability();

this object returened the the free rooms using the DOT NOTATION .

Problem domain

Problem domain or ( problem space) is an engineering term referring to all information that defines the problem and constrains the solution (the constraints being part of the problem). It includes the goals that the problem owner wishes to achieve, the context within which the problem exists, and all rules that define essential functions or other aspects of any solution product. It represents the environment in which a solution will have to operate, as well as the problem itself.

THE DOM TREE

is a model of a website As a browser loads a web page, it creates a model of that page. The model is called a DOM tree, and it is stored in the browsers' memory. It consists of four main types of nodes. So its used to simplfy the user acess to attributs.

live URL : https://marwan-zakia.github.io/reading-note/201read05.md (Links to an external site.)

repo link : https://marwan-zakia.github.io/reading-note/ (Links to an external site.)