Skip to content

Latest commit

 

History

History
63 lines (56 loc) · 3 KB

File metadata and controls

63 lines (56 loc) · 3 KB

Domain modeling

is the process of creating a conceptual model in code for a specific problem.

Define a constructor and initialize properties: To define the same properties between many objects, you'll want to Model epic fails videos. img

This is object-oriented programming in JavaScript at its most fundamental level.

  • The new keyword instantiates (i.e. creates) an object.
  • The constructor function initializes properties inside that object using the this variable.
  • The object is stored in a variable for later use.

Generate random numbers To model the random nature of user behavior, you'll need the help of a random number generator Imagine you've been tasked to build a program that models the popularity of epic fail videos. After months of painstaking research, you've determined that the two essential metrics for gauging popularity are an epic rating and whether or not the video has animals.

What's a Table?

A table represents information in a grid format. Basic Table Structure The < table> element is used to create a table. You indicate the start of each row using the opening < tr> tag Each cell of a table is represented using a < td>element. The headings of the table should sit inside the < thead> element The body should sit inside the < tbody> element. The footer belongs inside the < tfoot> element.

Constructor notation:

the new keyword and object counstuctor creat a blank object, you can then add porperters and mothods to the object. var name =new object(); updating an object objectname.nameporpeter ='propertervalue' deleting delet object.name THIS (IT IS A KEYWORD):It always refers to one object, usually the object in which the function operates.

STORING DATA:

  • array :you can combine arrays and object to creat complex data structure. If the order of the items is important, use an array.
    • INDIVIDUAL OBJECTS Objects store sets of name/value pairs. They can be properties (variables) or methods (functions).
    • MULTIPLE OBJECTS When you need to create multiple objects within the same page, you should use an object.
  • VARIABLES Document object model :creat model of the current page. Globle javascript objects:there are group invidual object that relate to diffrent parts of jc langouge. The topmost object in the Document Object Model (or DOM) is the document object. It represents the web page loaded into the current browser window or tab.

Data type :

  • SIMPLE OR PRIMITIVE DATA TYPES JavaScript has five simple (or primitive) data types:
  1. String
  2. Number
  3. Boolean
  4. Undefined (a variable that has been declared, but no value has been assigned to it yet)
  5. Null (a variable with no value - it may have had one at some point, but no longer has a value)
  • COMPLEX DATA TYPE JavaScript also defines a complex data type:
  1. 0bject Under the hood, arrays and functions are considered types of objects