Skip to content

Commit b8aa64f

Browse files
authored
4-clear-elem/solution.md
2-ui/1-document/07-modifying-document/4-clear-elem/solution.md
1 parent 92459c6 commit b8aa64f

File tree

1 file changed

+5
-5
lines changed
  • 2-ui/1-document/07-modifying-document/4-clear-elem

1 file changed

+5
-5
lines changed

2-ui/1-document/07-modifying-document/4-clear-elem/solution.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
First, let's see how *not* to do it:
2+
İlk olarak, bunun nasıl *yapılmadığını* görelim:
33

44
```js
55
function clear(elem) {
@@ -9,11 +9,11 @@ function clear(elem) {
99
}
1010
```
1111

12-
That won't work, because the call to `remove()` shifts the collection `elem.childNodes`, so elements start from the index `0` every time. But `i` increases, and some elements will be skipped.
12+
Bu işlemeyecektir, çünkü `remove()` çağrısı `elem.childNodes` koleksiyonunun yerini değiştirir, bu nedenle her seferinde öğeler "0" dizininden başlar. Ama "i" ıle değeri artar ve bazı öğeler atlanmış olabilir.
1313

14-
The `for..of` loop also does the same.
14+
`for..of` döngüsü(loop) de aynısını yapar.
1515

16-
The right variant could be:
16+
Doğru değişken(variant) şöyle olabilir:
1717

1818
```js
1919
function clear(elem) {
@@ -23,7 +23,7 @@ function clear(elem) {
2323
}
2424
```
2525

26-
And also there's a simpler way to do the same:
26+
Ve aynısını yapmanın daha basit bir yolu da var:
2727

2828
```js
2929
function clear(elem) {

0 commit comments

Comments
 (0)