Merge pull request #2 from ubongndoh/ubongndoh-patch-2

Update 11_day_destructuring_and_spreading.md file
pull/96/head
Ubong Ndoh 5 years ago committed by GitHub
commit c3bfac5b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,7 +57,7 @@ Destructuring is a way to unpack arrays, and objects and assigning to a distinct
```js
const names = ['Asabeneh', 'Brook', 'David', 'John']
let [firstPerson, secondPerson, ThirdPerson, fourth Person] = names
let [firstPerson, secondPerson, thirdPerson, fourthPerson] = names
console.log(firstName, secondPerson,thirdPerson, fourthPerson)
```
@ -108,7 +108,7 @@ If we like to skip on of the values in the array we use additional comma. The co
```js
const names = ['Asabeneh', 'Brook', 'David', 'John']
let [, secondPerson, , fourth Person] = name // first and third person is omitted
let [, secondPerson, , fourthPerson] = name // first and third person is omitted
console.log(secondPerson, fourthPerson)
```

Loading…
Cancel
Save