Sentences made more formal (#28109)
This commit is contained in:
committed by
Jonathan Grah
parent
5a575c2429
commit
7721bf68b3
@ -4,7 +4,7 @@ title: Arrow Functions
|
|||||||
|
|
||||||
## Arrow functions
|
## Arrow functions
|
||||||
|
|
||||||
Functions in ES6 have changed a bit. I mean the syntax.
|
ES6 has introduced a new syntax that allows to declare functions.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// Old Syntax
|
// Old Syntax
|
||||||
@ -21,8 +21,7 @@ const newOne = () => {
|
|||||||
const newOne = () => console.log("Hello World..!");
|
const newOne = () => console.log("Hello World..!");
|
||||||
```
|
```
|
||||||
|
|
||||||
The new syntax may be confusing a little bit. But I will try to explain the syntax.
|
The new syntax may be confusing. There are two major parts of it.
|
||||||
There are two parts of the syntax.
|
|
||||||
|
|
||||||
1. const newOne = ()
|
1. const newOne = ()
|
||||||
2. => {}
|
2. => {}
|
||||||
@ -61,7 +60,3 @@ axios.get(url).then(response => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
I don’t think I need to give an explanation for this. It's straightforward.
|
|
||||||
|
Reference in New Issue
Block a user