Skip to content

Commit d7a8490

Browse files
committed
1-js/05-data-types/05-array-methods/
Ru translation / + the slice block has been translated
1 parent 9733b74 commit d7a8490

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

1-js/05-data-types/05-array-methods/article.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,20 @@ alert( arr ); // 1,2,3,4,5
116116

117117
### Метод slice
118118

119-
The method [arr.slice](mdn:js/Array/slice) is much simpler than similar-looking `arr.splice`.
119+
Метод [arr.slice](mdn:js/Array/slice) намного проще чем похожий на него `arr.splice`
120120

121-
The syntax is:
121+
Его синтаксис:
122122

123123
```js
124124
arr.slice(start, end)
125125
```
126126

127-
It returns a new array containing all items from index `"start"` to `"end"` (not including `"end"`). Both `start` and `end` can be negative, in that case position from array end is assumed.
127+
Он возвращает новый массив, который содержит в себе все элементы начиная со `"start"` и заканчивая `"end"` (не включая `"end"`).
128+
Оба индекса `start` и `end` могут быть отрицательными. В этом случае отсчёт будет осуществляться с конца массива.
128129

129-
It works like `str.slice`, but makes subarrays instead of substrings.
130+
Это работает так же как и `str.slice`, но делает подмассивы вместо подстрок
130131

131-
For instance:
132+
Например:
132133

133134
```js run
134135
let str = "test";
@@ -141,17 +142,18 @@ alert( str.slice(-2) ); // st
141142
alert( arr.slice(-2) ); // s,t
142143
```
143144

144-
### concat
145+
### Метод concat
145146

146-
The method [arr.concat](mdn:js/Array/concat) joins the array with other arrays and/or items.
147+
Метод [arr.concat](mdn:js/Array/concat) объединяет массив с другими массивами и/или элементами.
147148

148-
The syntax is:
149+
Его синтаксис:
149150

150151
```js
151152
arr.concat(arg1, arg2...)
152153
```
153154

154155
It accepts any number of arguments -- either arrays or values.
156+
Он принимает любое количество аргументов - которые могут быть массивами и значениями.
155157

156158
The result is a new array containing items from `arr`, then `arg1`, `arg2` etc.
157159

0 commit comments

Comments
 (0)