typos & syntax fixes (#26893)
This commit is contained in:
@ -37,17 +37,17 @@ Adds one or more element to the end of the array and returns with the new length
|
||||
```typescript
|
||||
var length = names.push('Tobias');
|
||||
// names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias']
|
||||
// lenght = 6
|
||||
// length = 6
|
||||
var length2 = names.push('Jack','Lily');
|
||||
// names[] = ['Javier', 'Emma', 'John', 'Sophia', 'Emma', 'Tobias','Jack','Lily']
|
||||
// lenght2 = 8
|
||||
// length2 = 8
|
||||
```
|
||||
|
||||
### reverse()
|
||||
Reverses the order of the array and returns with it
|
||||
```typescript
|
||||
var reverseNames = names.reverse();
|
||||
//reverseNames = ['Emma','Sophia','John','Emma','Javier']
|
||||
var reversedNames = names.reverse();
|
||||
//reversedNames = ['Emma','Sophia','John','Emma','Javier']
|
||||
```
|
||||
|
||||
### forEach()
|
||||
|
Reference in New Issue
Block a user