Please enable JavaScript.
Coggle requires JavaScript to display documents.
Objects (3- Objects built-in methods (Call (The call() method is a…
Objects
-
1- Objects Definition
1 - What are objects:
- Objects are non iterable object holding related key value pairs
- Objects can hold all kind of data (Primitive and Objects).
- Objects are dynamic objects, properties and methods can be added after the object has been created.
3 - Object methods:
- Objects uses functions to perform actions.
- When a function is inside of an object, it is called a method.
2 - Creation of objects:
Objects can be created using the following techniques:
- Literal notation (Most commonly used method).
- Factory function
- Constructor function
Note: Factory and Constructor object creation are equivalent
4 - Constructor Property
- Every object has a constructor property that references the function that was used in order to create the object.
- Using a literal notation to create Strings, Numbers and Booleans will call an implicit constructor function.
-
-
-