pull/370/merge
Nagacharan 3 years ago committed by GitHub
commit 69c01dccec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -85,7 +85,7 @@ const higherOrder = n => {
console.log(higherOrder(2)(3)(10))
```
Let us see were we use call back functions. For instance the _forEach_ method uses call back.
Let us see where we use call back functions. For instance the _forEach_ method uses call back.
```js
const numbers = [1, 2, 3, 4, 5]

@ -263,7 +263,7 @@ Set(3) {3, 4, 5}
### Difference of sets
To find an the difference between two sets can be achieved using filter. Lets find the different of set A and set B (A \ B)
To find an the difference between two sets can be achieved using filter. Lets find the difference of set A and set B (A \ B)
```js
let a = [1, 2, 3, 4, 5]

@ -184,7 +184,7 @@ Node Express MongoDB
### Destructuring Object
When we destructure the name of the variable we use to destructure should be exactly the same as the key or property of the object. See the example below.
When we destructure the name of the variable our destructure should be exactly the same as the key or property of the object. See the example below.
```js
const rectangle = {

@ -72,7 +72,7 @@ We have created an Person class but it does not have any thing inside.
Instantiation class means creating an object from a class. We need the keyword _new_ and we call the name of the class after the word new.
Let us create a dog object from our Person class.
Let us create a person object from our Person class.
```js
class Person {
@ -92,7 +92,7 @@ Let use the class constructor to pass different properties for the class.
### Class Constructor
The constructor is a builtin function which allows as to create a blueprint for our object. The constructor function starts with a keyword constructor followed by a parenthesis. Inside the parenthesis we pass the properties of the object as parameter. We use the _this_ keyword to attach the constructor parameters with the class.
The constructor is a builtin function which allows us to create a blueprint for our object. The constructor function starts with a keyword constructor followed by a parenthesis. Inside the parenthesis we pass the properties of the object as parameter. We use the _this_ keyword to attach the constructor parameters with the class.
The following Person class constructor has firstName and lastName property. These properties are attached to the Person class using _this_ keyword. _This_ refers to the class itself.

Loading…
Cancel
Save