Skip to content

Commit b161b30

Browse files
03-string>2-check-spam
1 parent 12b07a8 commit b161b30

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
describe("checkSpam", function() {
2-
it('finds spam in "buy ViAgRA now"', function() {
2+
it('uważa "buy ViAgRA now" za spam', function() {
33
assert.isTrue(checkSpam('buy ViAgRA now'));
44
});
55

6-
it('finds spam in "free xxxxx"', function() {
6+
it('uważa "free xxxxx" za spam', function() {
77
assert.isTrue(checkSpam('free xxxxx'));
88
});
99

10-
it('no spam in "innocent rabbit"', function() {
10+
it('nie uważa "innocent rabbit" za spam', function() {
1111
assert.isFalse(checkSpam('innocent rabbit'));
1212
});
1313
});

1-js/05-data-types/03-string/2-check-spam/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
To make the search case-insensitive, let's bring the string to lower case and then search:
1+
Aby wyszukiwanie działało bez względu na wielkość liter, przekonwertujemy cały łańcuch na małe litery, a następnie sprawdzimy, czy zawiera szukany ciąg znaków:
22

33
```js run demo
44
function checkSpam(str) {

1-js/05-data-types/03-string/2-check-spam/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ importance: 5
22

33
---
44

5-
# Check for spam
5+
# Sprawdzanie pod kątem spamu
66

7-
Write a function `checkSpam(str)` that returns `true` if `str` contains 'viagra' or 'XXX', otherwise `false`.
7+
Napisz funkcję `checkSpam(str)`, która zwraca `true` jeśli `str` zawiera 'viagra' lub 'XXX', w przeciwnym wypadku `false`.
88

9-
The function must be case-insensitive:
9+
Funkcja musi być niewrażliwa na wielkość liter:
1010

1111
```js
1212
checkSpam('buy ViAgRA now') == true

0 commit comments

Comments
 (0)