typos & syntax fixes (#26893)

This commit is contained in:
v01d3tr
2018-11-15 07:32:23 +01:00
committed by Aditya
parent 3de690ae5d
commit e017f5474a

View File

@ -37,17 +37,17 @@ Adds one or more element to the end of the array and returns with the new length
```typescript ```typescript
var length = names.push('Tobias'); var length = names.push('Tobias');
// names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias'] // names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias']
// lenght = 6 // length = 6
var length2 = names.push('Jack','Lily'); var length2 = names.push('Jack','Lily');
// names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias','Jack','Lily'] // names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias','Jack','Lily']
// lenght2 = 8 // length2 = 8
``` ```
### reverse() ### reverse()
Reverses the order of the array and returns with it Reverses the order of the array and returns with it
```typescript ```typescript
var reverseNames = names.reverse(); var reversedNames = names.reverse();
//reverseNames = ['Emma','Sophia','John','Emma','Javier'] //reversedNames = ['Emma','Sophia','John','Emma','Javier']
``` ```
### forEach() ### forEach()