Skip to content

Commit 82285a9

Browse files
string#string-length
1 parent 7e952df commit 82285a9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

1-js/05-data-types/03-string/article.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,20 @@ To możliwe, ale musimy go podwoić `\\`:
124124
alert( `The backslash: \\` ); // The backslash: \
125125
```
126126

127-
## String length
127+
## Długość łańcucha
128128

129-
The `length` property has the string length:
129+
Właściwość `length` zawiera długość ciągu:
130130

131131
```js run
132132
alert( `My\n`.length ); // 3
133133
```
134134

135-
Note that `\n` is a single "special" character, so the length is indeed `3`.
135+
Pamiętaj, że `\n` to pojedynczy "znak specjalny", więc długość łańcucha wynosi `3`.
136136

137-
```warn header="`length` is a property"
138-
People with a background in some other languages sometimes mistype by calling `str.length()` instead of just `str.length`. That doesn't work.
137+
```warn header="`length` jest wartością"
138+
Zdarza się, że osoby z praktyką w innych językach przypadkowo dodają nawiasy `str.length()`, zamiast po prostu `str.length`. To nie zadziała.
139139

140-
Please note that `str.length` is a numeric property, not a function. There is no need to add parenthesis after it.
140+
Należy pamiętać, że `str.length` jest właściwością numeryczną, a nie funkcją. Nie ma potrzeby dodawania po nim nawiasu.
141141
```
142142
143143
## Accessing characters

0 commit comments

Comments
 (0)