Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions JavaScript/Part1/Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

>An object in JavaScript is a collection of key-value pairs. Each key-value pair is called as a property.
>A property can be a function, an array, an object itself or any primitive data type i.e. integer, string, etc.
>Functions in the object are called as methods.
>Functions are also objects in JavaScript. Functions in the object are called as methods.

>Consider a simple object:

Expand Down Expand Up @@ -46,7 +46,7 @@ human.getAge = function(){
}
```

>Now console human and we will find new properties age and getAge() added to human object as shown below:
>Now, console.log human and we will find new properties age and getAge() added to human object as shown below:
```javascript
Console.log(human);
```
Expand All @@ -61,7 +61,7 @@ human["firstName"]; //Output: Virat

human["fullName"](); //Output: Virat Kohli
```
> New properties can be added using the Square bracket notation as shown below:
> New properties can be added to the object using the Square bracket notation as shown below:

```javascript
human["weight"] = 65
Expand Down