Skip to content

Commit 92d1244

Browse files
authored
Update osa2e.md
Filter is not included in the code preceding the paragraph. Also when the code is first ran showAll is initialized to true so the filter part in the real definition of notesToShow is not reached. When notes == null the map causes an error.
1 parent bac6d16 commit 92d1244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/2/fi/osa2e.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ notesToShow = notes
390390
notesToShow.map(note => ...)
391391
```
392392
393-
ja tämä aiheuttaa ongelman, sillä arvolle _null_ ei voida kutsua metodia _filter_.
393+
ja tämä aiheuttaa ongelman, sillä arvolle _null_ ei voida kutsua metodia _map_.
394394
395395
Kun annoimme tilalle _notes_ alkuarvoksi tyhjän taulukon, ei samaa ongelmaa esiinny, tyhjälle taulukolle on luvallista kutsua metodia _filter_.
396396

0 commit comments

Comments
 (0)